Merge pull request #98 from akirak/dependabot/github_actions/cachix/i… #54
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 rust | |
on: | |
push: | |
paths: | |
# Set this to the directory of the template | |
- rust/** | |
- .github/workflows/check-rust.yml | |
workflow_dispatch: | |
workflow_call: | |
concurrency: | |
group: check-rust-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: cachix/install-nix-action@v29 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
flake-registry = https://raw.githubusercontent.com/akirak/flake-pins/master/registry.json | |
- uses: actions/checkout@v4 | |
with: | |
path: ./tmp | |
- run: nix flake new -t ./tmp#rust ./work | |
- name: Prepare the project | |
working-directory: work | |
run: | | |
git init | |
git add . | |
- name: Check executables | |
run: | | |
nix develop -L --command rustc --version | |
nix develop -L --command cargo --version | |
nix develop -L --command rust-analyzer --version | |
# shellcheck disable=SC2016 | |
nix develop -L --command sh -c 'test -d ${RUST_SRC_PATH}' | |
working-directory: work |