mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 09:38:16 -07:00
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
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
|
|
|
|
- name: Install test dependencies
|
|
if: runner.os == 'linux'
|
|
run: |
|
|
PPA="ppa:fish-shell/nightly-master"
|
|
sudo add-apt-repository -y "$PPA"
|
|
sudo apt-get update
|
|
sudo apt-get -y install fish
|
|
|
|
- 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 }}
|