go: 1.21 -> 1.22 #143
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: "Check" | |
on: | |
pull_request: | |
push: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2.4.0 | |
- uses: cachix/install-nix-action@v15 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- run: nix develop --command make lint | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2.4.0 | |
- uses: cachix/install-nix-action@v15 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
nix develop --command make format | |
if [[ $(git diff) != "" ]] | |
then | |
echo "code format error, please run the following commands:" | |
echo " make format" | |
exit 1 | |
fi | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2.4.0 | |
- uses: cachix/install-nix-action@v15 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- run: nix flake check |