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

Enable Windows tests on GitHub Actions #679

Merged
merged 1 commit into from
Mar 15, 2020
Merged
Show file tree
Hide file tree
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
42 changes: 27 additions & 15 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,62 @@ name: Main workflow
on:
push:
paths-ignore:
- '**.md'
- "**.md"
pull_request:
paths-ignore:
- '**.md'
- "**.md"
schedule:
- cron: "0 0 * * 5"

jobs:
test:
strategy:
matrix:
os: [macOS-latest, ubuntu-latest]
os: [macos-latest, ubuntu-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Fetch all tags
run: git fetch --depth 1 origin +refs/tags/*:refs/tags/*

- name: Install macOS deps
if: matrix.os == 'macOS-latest'
- name: Install dependencies on macOS
if: matrix.os == 'macos-latest'
run: |
brew install coreutils # needed by bats-core
brew install fish # for testing asdf.fish

- name: Install ubuntu deps
- name: Install dependencies on Ubuntu
if: matrix.os == 'ubuntu-latest'
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 --branch v1.1.0 https://github.com/bats-core/bats-core.git $HOME/bats-core
- name: Install bats-core on Windows
if: matrix.os == 'windows-latest'
run: npm install -g bats@1.1.0

- name: Run tests
- name: Install bats-core on Unix systems
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
run: |
export PATH=$HOME/bats-core/bin:$PATH
bats test
git clone --depth 1 --branch v1.1.0 https://github.com/bats-core/bats-core.git $HOME/bats-core
echo "::add-path::$HOME/bats-core/bin"

- name: Run tests on Windows
if: matrix.os == 'windows-latest'
run: bats test
env:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true

- name: Run tests on Unix systems
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
run: bats test
env:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -64,7 +76,7 @@ jobs:
run: bash lint.sh

format:
runs-on: macOS-latest
runs-on: macos-latest

steps:
- name: Checkout code
Expand Down
18 changes: 0 additions & 18 deletions appveyor.yml

This file was deleted.