From 48d0402aa00918af14bddf24b16d5b11c8e99a86 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Fri, 2 Apr 2021 14:43:30 -0700 Subject: [PATCH] Add a github actions config file --- .github/workflows/ci.yml | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..15df90c2c2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - "**" + +env: + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + +jobs: + tests: + name: Tests + runs-on: macos-latest + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + # Work around https://github.com/actions/cache/issues/403. + - name: Use GNU tar + run: | + echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV + + - name: Cache artifacts + id: cache + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} + + - name: Install rust + if: steps.cache.outputs.cache-hit != 'true' + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + + - name: Run tests + run: cargo test +