-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: basic frontend and backend CI pipeline
Add basic frontend and backend CI workflows which acts on push and pull requests. The workflows are only triggered for changes in their respective directories.
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build Backend | ||
|
||
# We want this workflow to be only triggered for changes to the backend | ||
on: | ||
push: | ||
paths: | ||
- './backend/**' | ||
pull_request: | ||
paths: | ||
- './backend/**' | ||
|
||
jobs: | ||
build-backend: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./backend | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Set up Maven | ||
uses: stCarolas/[email protected] | ||
with: | ||
maven-version: 3.8.6 | ||
# Compile and run unit and integration tests | ||
- name: Build | ||
run: mvn -B verify --file pom.xml | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: npm test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Build Frontend | ||
|
||
# We want this workflow to be only triggered for changes to the frontend | ||
on: | ||
push: | ||
paths: | ||
- './frontend/**' | ||
pull_request: | ||
paths: | ||
- './frontend/**' | ||
|
||
jobs: | ||
build-frontend: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./frontend | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: yarn install | ||
# Requires lockfile to be updated first | ||
# - run: yarn install --frozen-lockfile | ||
- run: yarn build |