CI #116
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 | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
# Once a week on saturday | |
- cron: '7 13 * * 6' | |
workflow_dispatch: | |
env: | |
NUR_REPO: shamilton | |
CACHIX_CACHE: scott-hamilton | |
NIXPKGS_ALLOW_BROKEN: 0 | |
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v27 | |
with: | |
nix_path: nixpkgs=channel:nixos-24.05 | |
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm" | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: scott-hamilton | |
- name: Run coverage with Nix test-driver | |
run: | | |
nix-build coverage/test.nix | |
cp -Lr result results | |
ls -lh | |
ls -lh results | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v4.3.4 | |
with: | |
name: code-coverage-report | |
path: | | |
results | |
- name: Push coverage data to Codacy | |
uses: codacy/codacy-coverage-reporter-action@v1.3.0 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: result/coverage_data/tabbed-alacritty.lcov |