Skip to content

Commit

Permalink
bye travis
Browse files Browse the repository at this point in the history
  • Loading branch information
rdebleu committed Dec 6, 2020
1 parent c53d993 commit 847ec52
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 59 deletions.
113 changes: 113 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
ci:
name: ci
runs-on: ubuntu-latest

env:
DB: pgsql

services:
postgres:
image: postgres
env:
POSTGRES_USER: moodleuser
POSTGRES_PASSWORD: moodle
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

strategy:
fail-fast: false
matrix:
include:
- php: '7.4'
moodle-branch: 'master'
- php: '7.4'
moodle-branch: 'MOODLE_311_STABLE'
- php: '7.4'
moodle-branch: 'MOODLE_310_STABLE'
- php: '7.4'
moodle-branch: 'MOODLE_39_STABLE'
- php: '7.4'
moodle-branch: 'MOODLE_38_STABLE'

steps:
- name: Checkout plugin
uses: actions/checkout@v2
with:
path: this-plugin

- name: Checkout moodle-plugin-ci
uses: actions/checkout@v2
with:
repository: moodlehq/moodle-plugin-ci
path: ci

- name: Composer install
run: cd ci; composer install

- name: Set path 1
run: echo "$(cd ci/bin; pwd)" >> $GITHUB_PATH

- name: Set path 2
run: echo "$(cd ci/vendor/bin; pwd)" >> $GITHUB_PATH

- name: Set AU
run: sudo locale-gen en_AU.UTF-8

- name: Install Moodle
run: moodle-plugin-ci install --branch ${{ matrix.moodle-branch }} --db-user moodleuser --db-pass moodle --plugin this-plugin

- name: phplint
run: moodle-plugin-ci phplint

- name: phpcpd
run: moodle-plugin-ci phpcpd

- name: phpmd
run: moodle-plugin-ci phpmd

- name: codechecker
run: moodle-plugin-ci codechecker

- name: validate
run: moodle-plugin-ci validate

- name: savepoints
run: moodle-plugin-ci savepoints

- name: mustache
run: moodle-plugin-ci mustache

- name: grunt
run: moodle-plugin-ci grunt

- name: phpunit
run: moodle-plugin-ci phpunit --coverage-text --coverage-clover

- name: firefox
run: moodle-plugin-ci behat

- name: chrome
run: moodle-plugin-ci behat --profile chrome

- name: coveralls
env:
COVERALLS_RUN_LOCALLY: true
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: moodle-plugin-ci coveralls-upload
if: matrix.moodle-branch == 'master'
59 changes: 0 additions & 59 deletions .travis.yml

This file was deleted.

0 comments on commit 847ec52

Please sign in to comment.