ci.yml

 1name: CI
 2
 3on:
 4  push:
 5    branches:
 6      - master
 7  pull_request:
 8    branches:
 9      - "**"
10
11env:
12  CARGO_TERM_COLOR: always
13  CARGO_INCREMENTAL: 0
14
15jobs:
16  tests:
17    name: Tests
18    runs-on: self-hosted
19    steps:
20      - name: Checkout repo
21        uses: actions/checkout@v2
22
23      # Work around https://github.com/actions/cache/issues/403.
24      - name: Use GNU tar
25        run: |
26          echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV
27
28      - name: Cache artifacts
29        id: cache
30        uses: actions/cache@v2
31        with:
32          path: |
33            ~/.cargo/registry
34            ~/.cargo/git
35            target
36          key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
37
38      - name: Install Rust
39        if: steps.cache.outputs.cache-hit != 'true'
40        uses: actions-rs/toolchain@v1
41        with:
42          toolchain: stable
43          profile: minimal
44
45      - name: Run tests
46        run: cargo test --no-fail-fast
47
48      - name: Create and upload app bundle
49        run: script/bundle
50      - uses: actions/upload-artifact@v2
51        with:
52          name: Zed.app
53          path: target/release/bundle/osx/Zed.app