Skip to content

Commit

Permalink
Enable Windows tests on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
BSKY committed Mar 15, 2020
1 parent 8a5c70b commit 560ee6b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 33 deletions.
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.

0 comments on commit 560ee6b

Please sign in to comment.