From be8be3dd386feb0003ad99f494e8a2ab8da2ffa7 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Mon, 1 Apr 2024 21:40:25 +0800 Subject: [PATCH] Run tests on Windows too (#146) --- .github/workflows/phpcs.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml index e8a52ed..277d046 100644 --- a/.github/workflows/phpcs.yml +++ b/.github/workflows/phpcs.yml @@ -4,18 +4,26 @@ on: [push, pull_request] jobs: test: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - include: - - php: 8.3 - - php: 8.2 - - php: 8.1 - - php: 8.0 - - php: 7.4 + php: + - 8.3 + - 8.2 + - 8.1 + - 8.0 + - 7.4 + os: + - ubuntu-latest + - windows-latest steps: + - name: Set git to use LF + run: | + git config --global core.autocrlf false + git config --global core.eol lf + - name: Check out repository code uses: actions/checkout@v4 @@ -55,7 +63,7 @@ jobs: run: ./vendor/bin/phpunit-coverage-check -t 80 clover.xml - name: Integration tests - if: ${{ !cancelled() }} + if: ${{ (!cancelled()) && (runner.os == 'ubuntu-latest') }} run: | # There is one failure (exit with error) vendor/bin/phpcs --standard=moodle moodle/Tests/fixtures/integration_test_ci.php | tee output.txt || [[ $? = 1 ]]