fix: use temp directory for watch mode files, fixes 1093 #1680
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: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Test | |
run: nix develop --command xc test-cover | |
- name: Copy coverage.out to temp | |
run: cp coverage.out $RUNNER_TEMP | |
- name: Update coverage report | |
uses: ncruces/go-coverage-report@57ac6f0f19874f7afbab596105154f08004f482e | |
with: | |
coverage-file: ${{ runner.temp }}/coverage.out | |
report: 'true' | |
chart: 'true' | |
reuse-go: 'true' | |
if: | | |
github.event_name == 'push' | |
- name: Build | |
run: nix build | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Lint | |
run: nix develop --command xc lint | |
ensure-generated: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Generate | |
run: nix develop --command xc ensure-generated | |
ensure-fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: DeterminateSystems/magic-nix-cache-action@v8 | |
- name: Fmt | |
run: nix develop --command xc fmt | |
- name: Ensure clean | |
run: git diff --exit-code |