Skip to content

Commit

Permalink
Simplify matrix tests (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2b3bfa0 authored May 13, 2021
1 parent b324af3 commit 5385148
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ jobs:
check:
strategy:
matrix:
os:
[
'{"runs-on": "ubuntu-latest"}',
'{"runs-on": "macos-latest"}',
'{"runs-on": "ubuntu-latest", "container": "ubuntu:18.04"}',
'{"runs-on": "windows-latest"}',
]
runs-on: ${{ fromJSON(matrix.os).runs-on }}
container: ${{ fromJSON(matrix.os).container }}
system:
- ubuntu-latest
- macos-latest
- windows-latest
include:
- system: ubuntu-18.04
container: ubuntu:18.04
runs-on: ${{ matrix.system }}
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
if: "fromJSON(matrix.os).container == 'ubuntu:18.04'"
if: matrix.container == 'ubuntu:18.04'
with:
node-version: '12'
- uses: actions/setup-python@v2
if: "contains(fromJSON(matrix.os).runs-on, 'windows')"
if: matrix.system == 'windows'
with:
python-version: '3.x'
- run: npm ci
Expand All @@ -31,7 +31,7 @@ jobs:
with:
version: '1.0.1'
- name: test DVC specific version
if: "!contains(fromJSON(matrix.os).runs-on, 'windows')"
if: matrix.system != 'windows'
run: |
DVC_VER=$(dvc --version)
if [ $DVC_VER != '1.0.1' ]; then
Expand All @@ -40,7 +40,7 @@ jobs:
- name: local action with defaults
uses: ./
- name: test DVC latest version
if: "!contains(fromJSON(matrix.os).runs-on, 'windows')"
if: matrix.system != 'windows'
run: |
DVC_VER=$(dvc --version)
if [ $DVC_VER == '1.0.1' ]; then
Expand Down

0 comments on commit 5385148

Please sign in to comment.