Skip to content

Commit

Permalink
test: split ubuntu-macos from windows in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed Oct 6, 2024
1 parent dd4b9a6 commit b01b6cc
Showing 1 changed file with 30 additions and 28 deletions.
58 changes: 30 additions & 28 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,42 @@ on:
- main

jobs:
tests:
ubuntu-macos:
name: "Tests on ${{ matrix.os }}"
timeout-minutes: 10
name: "Run ${{ matrix.test_chunk }} tests on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
test_chunk: [acceptance, functional, unit]
os:
- ubuntu-latest
- macos-latest
- windows-latest
fail-fast: false

steps:
- name: Checkout code
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set up shell for Windows
if: matrix.os == 'windows-latest'
run: echo "Using bash as shell"
shell: bash

- name: Run tests
shell: bash
run: |
set -e # Exit on error
if [ -d tests/${{ matrix.test_chunk }} ]; then
./bashunit tests/bootstrap.sh tests/${{ matrix.test_chunk }}/*_test.sh
else
echo "Test directory tests/${{ matrix.test_chunk }} not found!"
exit 1
fi
- name: Run Tests
run: make test

simple-output:
name: "Tests simple output"
runs-on: ubuntu-latest
windows:
name: "Tests on windows (${{ matrix.test_chunk }})"
timeout-minutes: 10
runs-on: windows-latest
strategy:
matrix:
test_chunk: [acceptance, functional, unit]
fail-fast: false
steps:
- name: Checkout
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Tests
- name: Run tests
shell: bash
run: |
./bashunit -e tests/bootstrap.sh --simple tests/
./bashunit -e tests/bootstrap.sh tests/${{ matrix.test_chunk }}/*_test.sh
alpine:
name: "Tests on alpine-latest"
Expand All @@ -72,3 +61,16 @@ jobs:
adduser -D builder && \
chown -R builder /project && \
su - builder -c 'cd /project; make test';"
simple-output:
name: "Tests simple output"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Tests
run: |
./bashunit -e tests/bootstrap.sh --simple tests/

0 comments on commit b01b6cc

Please sign in to comment.