diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index f0b2118..92948df 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -6,15 +6,25 @@ on: jobs: ci: - name: ci + name: Cron runs-on: ubuntu-latest + services: + postgres: + image: postgres + env: + POSTGRES_USER: 'postgres' + POSTGRES_HOST_AUTH_METHOD: 'trust' + options: --health-cmd="pg_isready" --health-interval 10s --health-timeout 5s --health-retries 5 + ports: + - 5432:5432 + strategy: fail-fast: false matrix: moodle-branch: ['main'] - php: ['8.2'] - database: ['mysqli'] + php: ['8.3'] + database: ['pgsql'] steps: - name: checkout plugin @@ -35,57 +45,49 @@ jobs: echo $(cd ci/bin; pwd) >> $GITHUB_PATH echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH sudo locale-gen en_AU.UTF-8 - sudo systemctl start mysql.service - name: install Moodle - run: moodle-plugin-ci --ansi install --db-user=root --db-pass=root --db-host=127.0.0.1 --plugin this-plugin + run: moodle-plugin-ci install -db-host=127.0.0.1 --plugin this-plugin env: DB: ${{ matrix.database }} MOODLE_BRANCH: ${{ matrix.moodle-branch }} - + - name: phplint - if: ${{ always() }} + if: ${{ !cancelled() }} run: moodle-plugin-ci --ansi phplint - name: phpmd - if: ${{ always() }} + if: ${{ !cancelled() }} run: moodle-plugin-ci --ansi phpmd - name: phpdoc - if: ${{ always() }} + if: ${{ !cancelled() }} run: moodle-plugin-ci --ansi phpdoc - name: codechecker - if: ${{ always() }} + if: ${{ !cancelled() }} run: moodle-plugin-ci --ansi codechecker - name: validate - if: ${{ always() }} + if: ${{ !cancelled() }} run: moodle-plugin-ci --ansi validate - name: savepoints - if: ${{ always() }} + if: ${{ !cancelled() }} run: moodle-plugin-ci --ansi savepoints - name: grunt - if: ${{ always() }} + if: ${{ !cancelled() }} run: moodle-plugin-ci --ansi grunt || true - name: mustache - if: ${{ always() }} + if: ${{ !cancelled() }} run: moodle-plugin-ci --ansi mustache - name: phpunit - continue-on-error: true - if: ${{ always() }} + if: ${{ !cancelled() }} run: moodle-plugin-ci --ansi phpunit --testdox --coverage-text --coverage-clover - name: behat - if: ${{ always() }} + if: ${{ !cancelled() }} run: moodle-plugin-ci --ansi behat --profile=chrome - - - name: coveralls - if: ${{ always() }} - run: moodle-plugin-ci coveralls-upload || true - env: - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/infection.yml b/.github/workflows/infection.yml index febdd14..6afebd1 100644 --- a/.github/workflows/infection.yml +++ b/.github/workflows/infection.yml @@ -4,15 +4,25 @@ on: [push, pull_request] jobs: ci: - name: ci + name: infection runs-on: ubuntu-latest + services: + postgres: + image: postgres + env: + POSTGRES_USER: 'postgres' + POSTGRES_HOST_AUTH_METHOD: 'trust' + options: --health-cmd="pg_isready" --health-interval 10s --health-timeout 5s --health-retries 5 + ports: + - 5432:5432 + strategy: fail-fast: false matrix: - moodle-branch: ['main'] - php: ['8.3'] - database: ['mysqli'] + moodle-branch: [main] + php: [8.3] + database: [pgsql] steps: - name: checkout plugin @@ -34,10 +44,9 @@ jobs: echo $(cd ci/bin; pwd) >> $GITHUB_PATH echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH sudo locale-gen en_AU.UTF-8 - sudo systemctl start mysql.service - name: install Moodle - run: moodle-plugin-ci install --db-user=root --db-pass=root --db-host=127.0.0.1 --plugin this-plugin + run: moodle-plugin-ci install --db-host=127.0.0.1 --plugin this-plugin env: DB: ${{ matrix.database }} MOODLE_BRANCH: ${{ matrix.moodle-branch }}