archive: add package tests #71
Workflow file for this run
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: lint & tests | |
on: | |
pull_request: | |
jobs: | |
lint: | |
name: Perform linting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v25 | |
- uses: cachix/cachix-action@v14 | |
with: | |
name: devenv | |
- name: Install devenv.sh | |
# run: nix profile install github:cachix/devenv/latest | |
run: nix profile install nixpkgs#devenv | |
shell: sh | |
- run: devenv version | |
- run: devenv shell task lint | |
check: | |
name: Check file format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: devenv | |
- name: Install devenv.sh | |
run: nix profile install github:cachix/devenv/latest | |
shell: sh | |
- run: devenv ci | |
- run: devenv shell task fmt:check | |
- run: devenv shell task go-imports | |
tests: | |
name: Run tests | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest] | |
runs-on: "${{ matrix.os }}" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: devenv | |
- name: Install devenv.sh | |
run: nix profile install github:cachix/devenv/latest | |
shell: sh | |
- run: devenv ci | |
- run: devenv shell task tests:coverage | |
- uses: codecov/codecov-action@v2 | |
with: | |
verbose: true |