-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (48 loc) · 1.51 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Tests
on:
push:
branches:
- master
pull_request:
env:
BATS_VERSION: v1.3.0
jobs:
nix:
strategy:
fail-fast: false
matrix:
os:
- macos-10.15
# - macos-11 - enable once out of private preview: https://github.com/actions/virtual-environments#available-environments
- ubuntu-18.04
- ubuntu-20.04
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install test dependencies
if: runner.os == 'macos'
run: brew install coreutils fish elvish
- name: Install test dependencies
if: runner.os == 'linux'
run: |
sudo add-apt-repository -y ppa:fish-shell/nightly-master
sudo apt-get update
sudo apt-get -y install fish curl
# Download elvish binary and add to path
curl https://dl.elv.sh/linux-amd64/elvish-v0.18.0.tar.gz -o elvish-v0.18.0.tar.gz
tar xzf elvish-v0.18.0.tar.gz
rm elvish-v0.18.0.tar.gz
mkdir -p "$HOME/bin"
mv elvish-v0.18.0 "$HOME/bin/elvish"
echo "$HOME/bin" >>"$GITHUB_PATH"
- name: Install bats
run: |
git clone --depth 1 --branch "${{ env.BATS_VERSION }}" https://github.com/bats-core/bats-core.git $HOME/bats-core
echo "$HOME/bats-core/bin" >>"$GITHUB_PATH"
- name: Run tests
run: bats test
env:
GITHUB_API_TOKEN: ${{ github.token }}