Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates CI workflow file. #188

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,26 @@ on:
push:
pull_request:
schedule:
- cron: '33 2 * * 1' # weekly, on Monday morning
- cron: "33 2 * * 1" # weekly, on Monday morning

jobs:
test:
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"
Expand All @@ -25,19 +34,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

Expand All @@ -57,7 +60,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: |
Expand Down Expand Up @@ -110,4 +115,4 @@ jobs:

- name: Mark cancelled jobs as failed.
if: ${{ cancelled() }}
run: exit 1
run: exit 1