diff --git a/.github/actions/tests.sh b/.github/actions/tests.sh new file mode 100755 index 0000000..fe3d231 --- /dev/null +++ b/.github/actions/tests.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +npx cypress run --spec "cypress/tests/data/10-ApplicationSetup/*.cy.js,cypress/tests/data/60-content/VkarbasizaedSubmission.cy.js" + +npx cypress run --config specPattern=plugins/themes/pragma/cypress/tests/functional + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..73b586d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +on: [push] +name: pragma +jobs: + pragma: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - application: ojs + php-version: 8.3 + database: mysql + - application: ojs + php-version: 8.2 + database: mysql + - application: ojs + php-version: 8.3 + database: pgsql + - application: ojs + php-version: 8.2 + database: pgsql + + name: pragma + steps: + - uses: pkp/pkp-github-actions@v1 + with: + node_version: 20 + branch: main + repository: pkp + plugin: true + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 95a6db4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,47 +0,0 @@ -# @file -# .travis.yml - PKP Plugins Integration - -dist: focal -os: linux -language: php - -addons: - chrome: beta - postgresql: "9.5" - apt: - update: true - packages: - - libvulkan1 - - libu2f-udev - -sudo: required - -php: - - 8.1.0 - - 8.2.0 -env: - - APPLICATION=ojs BRANCH=main TEST=mysql - - APPLICATION=ojs BRANCH=main TEST=pgsql - -install: - - php --version | grep "PHP 8.2" && sudo apt-get install libonig5 - # Prepare OJS environment - - git clone -b ${BRANCH} https://github.com/pkp/${APPLICATION} ~/${APPLICATION} - - cd ~/${APPLICATION} - - git submodule update --init --recursive - - source lib/pkp/tools/travis/prepare-tests.sh - - lib/pkp/tools/travis/prepare-webserver.sh - # Build/install dependencies - - lib/pkp/tools/travis/install-composer-dependencies.sh - - npm i g -npm && npm install && npm run build - - ln -s ${TRAVIS_BUILD_DIR} ~/${APPLICATION}/plugins/themes/pragma - # Install OJS & prep data environment - - $(npm bin)/cypress run --spec "cypress/tests/data/10-ApplicationSetup/*.cy.js,cypress/tests/data/60-content/VkarbasizaedSubmission.cy.js" - -script: - - $(npm bin)/cypress run --config specPattern=plugins/themes/pragma/cypress/tests/functional - -after_failure: - - cat error.log - - sudo apt-get install sharutils - - tar cz cypress/screenshots | uuencode /dev/stdout