From 90ad819184973d047d54a1592d50996a9bd631d4 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Wed, 21 Aug 2024 11:43:26 -0700 Subject: [PATCH] updates CI workflow file. - apply temporary fix for broken NVM - add postgres to test matrix - reduce moodle environments down to M4.3 - version bump on checkout action --- .github/workflows/ci.yml | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dcc0622..cb9bc43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: push: pull_request: schedule: - - cron: '33 2 * * 1' # weekly, on Monday morning + - cron: "33 2 * * 1" # weekly, on Monday morning env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ILIOS_DEPLOYMENT_WEBHOOK_URL }} @@ -13,10 +13,19 @@ jobs: runs-on: ubuntu-latest services: + postgres: + image: postgres:13 + env: + POSTGRES_USER: "postgres" + POSTGRES_HOST_AUTH_METHOD: "trust" + ports: + - 5432:5432 + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3 + mariadb: image: mariadb:10 env: - MYSQL_USER: 'root' + MYSQL_USER: "root" MYSQL_ALLOW_EMPTY_PASSWORD: "true" MYSQL_CHARACTER_SET_SERVER: "utf8mb4" MYSQL_COLLATION_SERVER: "utf8mb4_unicode_ci" @@ -27,19 +36,13 @@ jobs: strategy: fail-fast: false matrix: - include: - - php: '8.3' - moodle-branch: 'main' - database: 'mariadb' - - php: '8.3' - moodle-branch: 'MOODLE_404_STABLE' - database: 'mariadb' - - php: '8.2' - moodle-branch: 'MOODLE_403_STABLE' - database: 'mariadb' + php: ["8.1", "8.2"] + moodle-branch: ["MOODLE_403_STABLE"] + database: [pgsql, mariadb] + steps: - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: plugin @@ -59,7 +62,9 @@ jobs: echo $(cd ci/bin; pwd) >> $GITHUB_PATH echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH sudo locale-gen en_AU.UTF-8 - echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV + #echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV + # Install nvm v0.39.7 (Temporary workaround for https://github.com/moodlehq/moodle-plugin-ci/issues/309). + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash - name: Install moodle-plugin-ci run: |