From 3741b312ab60b2f0a38a7462cc24c8b4b91e337d Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Tue, 26 May 2020 15:46:02 +0200 Subject: [PATCH] Add CI workflows --- .github/workflows/tests.yml | 81 +++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..1000426 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,81 @@ +name: CI +on: + push: + branches: + - master + pull_request: + +jobs: + tests: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: version info + run: rustc --version; cargo --version; + + - name: Run all tests + run: cargo test + + fmt: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings + + + sass-spec: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: version info + run: rustc --version; cargo --version; + + - name: Build binary + run: cargo b --release + + - name: Run Sass spec + run: ./sass-spec/sass-spec.rb -c './target/release/grass'