Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: only test on latest GitHub Runners #1438

Merged
merged 3 commits into from
Jan 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,15 @@ env:
NUSHELL_VERSION: 0.73.0

jobs:
nix:
strategy:
fail-fast: false
matrix:
os:
- macos-10.15
- macos-11
- macos-12
- ubuntu-20.04
- ubuntu-22.04
runs-on: ${{ matrix.os }}
ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install test dependencies
if: runner.os == 'macos'
run: brew install coreutils fish elvish nushell

- name: Install test dependencies
if: runner.os == 'linux'
run: |
sudo add-apt-repository -y ppa:fish-shell/nightly-master
sudo apt-get update
Expand Down Expand Up @@ -66,3 +52,24 @@ jobs:
run: bats test
env:
GITHUB_API_TOKEN: ${{ github.token }}

macos:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install test dependencies
run: brew install coreutils fish elvish nushell

- name: Install bats
run: |
git clone --depth 1 --branch "v$(grep -Eo "^\\s*bats\\s*.*$" ".tool-versions" | cut -d ' ' -f2-)" 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 }}