Skip to content

Commit

Permalink
ci: basic frontend and backend CI pipeline
Browse files Browse the repository at this point in the history
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
fbueltho committed Nov 29, 2022
1 parent 8d0ebce commit 14cdcf4
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/backend.yml
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

23 changes: 23 additions & 0 deletions .github/workflows/frontend.yml
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

0 comments on commit 14cdcf4

Please sign in to comment.