diff options
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/check.yml | 28 | ||||
| -rw-r--r-- | .github/workflows/ci.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/format_and_lint.yml | 73 |
3 files changed, 29 insertions, 74 deletions
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..2d516de --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,28 @@ +name: check project + +on: + push: + paths: + - "**.lock" + - "**.nix" + - "**.rs" + - "**.toml" + pull_request: + paths: + - "**.lock" + - "**.nix" + - "**.rs" + - "**.toml" + workflow_dispatch: + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: cachix/install-nix-action@v19 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + + - run: nix flake check -L diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43b5dd3..93256b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: - name: build run: | - nix build .#${{ matrix.output }} + nix build -L .#${{ matrix.output }} - name: upload to ghcr if: ${{ matrix.output == 'container' && github.ref == 'refs/heads/main' }} diff --git a/.github/workflows/format_and_lint.yml b/.github/workflows/format_and_lint.yml deleted file mode 100644 index 08a9dce..0000000 --- a/.github/workflows/format_and_lint.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: format and lint - -on: - push: - paths: - - "**.lock" - - "**.nix" - - "**.rs" - - "**.toml" - pull_request: - paths: - - "**.lock" - - "**.nix" - - "**.rs" - - "**.toml" - workflow_dispatch: - -jobs: - check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: check - - clippy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: clippy - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features - - fmt: - if: ${{ github.event_name == 'push' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: rustfmt - - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all - - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - - - run: nix fmt - - - uses: EndBug/add-and-commit@v9 - with: - default_author: github_actions - message: "chore: fmt files" |
