done przycisk (#43) #128
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
name: Build and test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
frontend: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install locked dependencies | |
run: npm ci | |
working-directory: frontend | |
- name: Build project | |
run: npm run build | |
working-directory: frontend | |
- name: Run tests | |
run: npm run test | |
working-directory: frontend | |
- name: Run linter | |
run: npm run lint | |
working-directory: frontend | |
backend: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Build project | |
run: gradle assemble | |
working-directory: backend | |
- name: Run tests | |
run: gradle test | |
working-directory: backend | |
- name: Run linter | |
run: gradle spotlessCheck | |
working-directory: backend |