fix(ci): skip cargo install if already installed #28
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
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
name: continuous-integration | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Nushell formatter test | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hustcer/setup-nu@main | |
with: | |
version: "*" | |
- run: nu --version | |
- name: Setup Rust toolchain and cache | |
uses: actions-rust-lang/setup-rust-toolchain@v1.10.1 | |
- name: Clone topiary | |
uses: GuillaumeFalourd/clone-github-repo-action@v2.3 | |
with: | |
branch: 'main' | |
owner: 'tweag' | |
repository: 'topiary' | |
- name: Install topiary-cli | |
run: | | |
cd topiary | |
topiary --version || cargo install --path topiary-cli | |
- name: Run tests | |
run: nu run_test.nu |