diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a3792e2d..2122d9fa 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,9 +18,23 @@ concurrency: jobs: ubuntu: - name: "Ubuntu - latest" + name: "Ubuntu - ${{ matrix.name }}" runs-on: ubuntu-latest timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + include: + - name: "make test" + command: "make test" + - name: "simple" + command: "./bashunit --simple tests/" + - name: "parallel simple" + command: "./bashunit --parallel --simple tests/" + - name: "parallel extended" + command: "./bashunit --parallel tests/" + - name: "strict" + command: "./bashunit --parallel --simple --strict tests/" steps: - name: Checkout uses: actions/checkout@v4 @@ -31,7 +45,7 @@ jobs: run: cp .env.example .env - name: Run Tests - run: make test + run: ${{ matrix.command }} localized-ubuntu: name: "Ubuntu - ${{ matrix.name }} Locale" @@ -92,25 +106,25 @@ jobs: run: make test windows: - name: "On windows (${{ matrix.name }})" + name: "Windows - ${{ matrix.name }}" timeout-minutes: 10 runs-on: windows-latest strategy: + fail-fast: false matrix: include: - - name: functional + - name: "functional" test_path: "tests/functional/*_test.sh" - name: "unit a-b" test_path: "tests/unit/[a-b]*_test.sh" - - name: "unit c" - test_path: "tests/unit/ch*_test.sh tests/unit/cl*_test.sh tests/unit/console*_test.sh tests/unit/cu*_test.sh" - - name: "unit coverage" - test_path: "tests/unit/coverage_*_test.sh" - - name: "unit d-p" - test_path: "tests/unit/[d-p]*_test.sh" + - name: "unit c + coverage" + test_path: "tests/unit/ch*_test.sh tests/unit/cl*_test.sh tests/unit/console*_test.sh tests/unit/cu*_test.sh tests/unit/coverage_*_test.sh" + - name: "unit d-g" + test_path: "tests/unit/[d-g]*_test.sh" + - name: "unit h-p" + test_path: "tests/unit/[h-p]*_test.sh" - name: "unit r-z" test_path: "tests/unit/[r-z]*_test.sh" - fail-fast: false steps: - name: Checkout code uses: actions/checkout@v4 @@ -123,24 +137,22 @@ jobs: - name: Run tests shell: bash - run: | - ./bashunit --parallel --jobs 4 ${{ matrix.test_path }} + run: ./bashunit --parallel --jobs 4 ${{ matrix.test_path }} windows-acceptance: - name: "On windows (${{ matrix.name }})" if: github.event_name == 'push' timeout-minutes: 10 runs-on: windows-latest strategy: + fail-fast: false matrix: include: - - name: "acceptance a-e" + - name: "a-e" test_path: "tests/acceptance/bashunit_[a-e]*_test.sh" - - name: "acceptance f-l" + - name: "f-l" test_path: "tests/acceptance/bashunit_[f-l]*_test.sh" - - name: "acceptance m-z" + - name: "m-z" test_path: "tests/acceptance/bashunit_[m-z]*_test.sh tests/acceptance/[i-p]*_test.sh" - fail-fast: false steps: - name: Checkout code uses: actions/checkout@v4 @@ -153,11 +165,10 @@ jobs: - name: Run tests shell: bash - run: | - ./bashunit --parallel --jobs 4 ${{ matrix.test_path }} + run: ./bashunit --parallel --jobs 4 ${{ matrix.test_path }} alpine: - name: "On alpine-latest" + name: "Alpine - latest" runs-on: ubuntu-latest timeout-minutes: 10 steps: @@ -177,71 +188,3 @@ jobs: adduser -D builder && \ chown -R builder /project && \ su - builder -c 'cd /project; make test';" - - simple-output: - name: "Simple output" - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup Config - run: cp .env.example .env - - - name: Run Tests - run: | - ./bashunit --simple tests/ - - simple-output-parallel: - name: "Simple output in parallel" - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup Config - run: cp .env.example .env - - - name: Run Tests - run: | - ./bashunit --parallel --simple tests/ - - extended-output-parallel: - name: "Extended output in parallel" - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup Config - run: cp .env.example .env - - - name: Run Tests - run: | - ./bashunit --parallel tests/ - - strict-mode: - name: "Strict mode" - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup Config - run: cp .env.example .env - - - name: Run Tests with strict mode - run: | - ./bashunit --parallel --simple --strict tests/