test(ci): add workflow #7
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: [push, pull_request] | |
name: Test | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
env: | |
CORELIB_PATH: /corelib/src | |
steps: | |
- name: Set up Git | |
run: git config --global core.sparseCheckout true | |
- name: Clone specific folder from another repository | |
run: | | |
sudo mkdir /corelib | |
cd /corelib | |
git init | |
git remote add origin https://github.com/0xLucqs/cairo.git | |
echo "/corelib" >> .git/info/sparse-checkout | |
git fetch --depth 1 origin lucas/multiline_diagnostic | |
git checkout lucas/multiline_diagnostic | |
- uses: actions/checkout@v3 | |
- name: Install toolchain | |
run: rustup show | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run cargo clippy | |
run: cargo clippy -- -D warnings | |
- name: Run cargo test | |
run: cargo test | |
- name: Run cargo fmt | |
run: rustup update nightly && rustup run nightly cargo fmt -- --check |