actions/.github/workflows/ci-check-and-unit-test.yml

42 lines
1,010 B
YAML

name: CI-check-and-unit-test
on:
push:
branches:
- 'main'
- 'release/**'
paths-ignore:
- 'dist/**'
pull_request:
permissions:
contents: read
jobs:
check-format-and-unit-test:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: sources/package-lock.json
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4 # Use a released version to avoid breakages
env:
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
with:
gradle-version: "8.10.2"
- name: Check formatting and compile
run: |
npm install
npm run check
npm run compile
working-directory: sources
- name: Run unit tests
run: |
npm test
working-directory: sources