Merge branch 'feature/50-pre-scanner' into develop #33
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: "CI: checks and tests" | |
on: | |
push: | |
branches: | |
- develop | |
- main | |
- bugfix/** | |
- feature/** | |
- hotfix/** | |
- release/** | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v4 | |
- name: Setup Deno | |
uses: denoland/setup-deno@4606d5cc6fb3f673efd4f594850e3f4b3e9d29cd | |
with: | |
deno-version: v2.x | |
- name: Run linter | |
run: deno lint | |
- name: Run tests and activate coverage | |
run: deno test --allow-read --allow-write --unstable-kv --allow-env --allow-net --coverage -- config.yml --database=./test/it-database.sqlite3 --scan | |
- name: Generate lcov report | |
run: deno task lcov | |
- name: Check test coverage minimum 90% | |
uses: terencetcf/github-actions-lcov-minimum-coverage-checker@v1 | |
with: | |
coverage-file: cov.lcov | |
minimum-coverage: 90 | |
build: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v4 | |
- name: Setup Deno | |
uses: denoland/setup-deno@4606d5cc6fb3f673efd4f594850e3f4b3e9d29cd | |
with: | |
deno-version: v2.x | |
- name: Build Linux binary x86_64 | |
run: deno task build:linux-x86_64 | |
- name: Archive Linux binary x86_64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: autophoto-linux-x86_64-1.0.0 | |
path: build/linux-x86_64 | |
- name: Build Linux binary ARM | |
run: deno task build:linux-arm | |
- name: Archive Linux binary ARM | |
uses: actions/upload-artifact@v4 | |
with: | |
name: autophoto-linux-arm-1.0.0 | |
path: build/linux-arm |