-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1899dd7
commit 20ada8e
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Lint | ||
|
||
on: | ||
pull_request: | ||
push: | ||
jobs: | ||
lint: | ||
name: Lint | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
- uses: DeterminateSystems/nix-installer-action@v9 | ||
continue-on-error: true # Self-hosted runners already have Nix installed | ||
|
||
- name: Install Attic | ||
run: | | ||
if ! command -v attic &> /dev/null; then | ||
./.github/install-attic-ci.sh | ||
fi | ||
- name: Configure Attic | ||
run: | | ||
: "${ATTIC_SERVER:=https://staging.attic.rs/}" | ||
: "${ATTIC_CACHE:=attic-ci}" | ||
echo ATTIC_CACHE=$ATTIC_CACHE >>$GITHUB_ENV | ||
export PATH=$HOME/.nix-profile/bin:$PATH # FIXME | ||
attic login --set-default ci "$ATTIC_SERVER" "$ATTIC_TOKEN" | ||
attic use "$ATTIC_CACHE" | ||
env: | ||
ATTIC_SERVER: ${{ secrets.ATTIC_SERVER }} | ||
ATTIC_CACHE: ${{ secrets.ATTIC_CACHE }} | ||
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }} | ||
|
||
- name: Cache dev shell | ||
run: | | ||
.ci/cache-shell.sh | ||
system=$(nix-instantiate --eval -E 'builtins.currentSystem') | ||
echo system=$system >>$GITHUB_ENV | ||
- name: Check rustfmt | ||
run: .ci/run just ci-rustfmt |
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