diff --git a/.github/workflows/workflows/main.yml b/.github/workflows/workflows/main.yml index 996de969e9..a439053f8c 100644 --- a/.github/workflows/workflows/main.yml +++ b/.github/workflows/workflows/main.yml @@ -1,4 +1,4 @@ -name: Integration test +name: OJS integration test on: push: branches: @@ -9,18 +9,18 @@ on: schedule: - cron: '0 1 1 * *' env: - APPLICATION: '${{ github.event.repository.name }}' - DBUSERNAME: pkp-ci - DBPASSWORD: pkp-ci - DBNAME: pkp-ci + APPLICATION: '${{ github.event.repository.name }}' + DBUSERNAME: ojs-ci + DBPASSWORD: ojs-ci + DBNAME: ojs-ci DBHOST: 127.0.0.1 DATABASEDUMP: database.sql.gz FILESDIR: files FILESDUMP: files.tar.gz CYPRESS_BASE_URL: http://127.0.0.1:8000 - CYPRESS_DBNAME: pkp-ci - CYPRESS_DBUSERNAME: pkp-ci - CYPRESS_DBPASSWORD: pkp-ci + CYPRESS_DBNAME: ojs-ci + CYPRESS_DBUSERNAME: ojs-ci + CYPRESS_DBPASSWORD: ojs-ci CYPRESS_DBHOST: 127.0.0.1 CYPRESS_FILESDIR: files @@ -29,11 +29,11 @@ jobs: name: ${{matrix.pkp-application}}(BRANCH=${{matrix.pkp-branch}} ;PHP=${{matrix.php-versions}}; DB=${{matrix.dbs}}) runs-on: ubuntu-latest strategy: - fail-fast: false + fail-fast: true matrix: php-versions: [ '8.1','8.2' ] dbs: [ 'pgsql', 'mysql','mariadb'] - pkp-application: ['${{ github.event.repository.name }}'] + pkp-application: ['${{ github.event.repository.name }}' ] pkp-branch: [ '${{ github.head_ref || github.ref_name }}' ] env: DBTYPE: ${{matrix.dbs == 'pgsql' && 'PostgreSQL' || 'MySQLi'}} @@ -81,7 +81,7 @@ jobs: lib/pkp/tools/travis/install-composer-dependencies.sh npm i g -npm && npm i @vue/cli-service && npm i cypress && npm install && npm run build - - name: Run validation and linting + - name: Run validation ad linting run: | mkdir -p $HOME/bin cd ~/${{matrix.pkp-application}} && npm install @@ -116,7 +116,7 @@ jobs: run: | cd ~/${{matrix.pkp-application}} if [ -d "cypress/tests/integration" ]; then - npx cypress run --headless --browser chrome --config '{"specPattern":["cypress/tests/integration/**/*.cy.js"]}' + npx cypress run --headless --browser chrome --config '{"specPattern":["cypress/tests/integration/**/*.cy.js"]}' fi - name: Run ${{matrix.pkp-application}} unit tests @@ -128,6 +128,5 @@ jobs: - name: Show failures log if: ${{ failure() }} run: | - sudo apt-get install sharutils - find cypress/screenshots -type f -printf '%T+\t%p\n' | sort | head -n 1 | cut -f 2 | tar -czT - | uuencode /dev/stdout - tail -n 500 error.log + cd ~/${{ matrix.pkp-application }} + cat access.log diff --git a/.github/workflows/workflows/upgrade.yml b/.github/workflows/workflows/upgrade.yml index 3329c25ca4..ff707aa137 100644 --- a/.github/workflows/workflows/upgrade.yml +++ b/.github/workflows/workflows/upgrade.yml @@ -12,25 +12,23 @@ on: jobs: install: - name: '${{matrix.pkp-application}}(VERSION=${{matrix.test-upgrade}} ;PHP=${{matrix.php-versions}}; DB=${{matrix.dbs}};)' + name: ${{matrix.pkp-application}}(VERSION=${{matrix.test-upgrade}} ;PHP=${{matrix.php-versions}}; DB=${{matrix.dbs}};) runs-on: ubuntu-latest strategy: fail-fast: false matrix: php-versions: [ '8.1','8.2' ] dbs: [ 'pgsql', 'mysql' ] - pkp-application: '${{ github.event.repository.name }}' + pkp-application: [ '${{ github.event.repository.name }}' ] test-upgrade: [ 'stable-3_4_0','stable-3_3_0','stable-3_2_1','stable-3_2_0' ] pkp-branch: [ '${{ github.head_ref || github.ref_name }}' ] - - env: - APPLICATION: '${{github.event.repository.name}}' + APPLICATION: '${{ github.event.repository.name }}' DBTYPE: ${{matrix.dbs == 'pgsql' && 'PostgreSQL' || 'MySQLi'}} CYPRESS_DBTYPE: ${{matrix.dbs=='pgsql' && 'PostgreSQL' || 'MySQLi'}} - DBUSERNAME: '${{ github.event.repository.name }}'-ci - DBPASSWORD: '${{ github.event.repository.name }}'-ci - DBNAME: '${{ github.event.repository.name }}'-ci + DBUSERNAME: ojs-ci + DBPASSWORD: ojs-ci + DBNAME: ojs-ci DBHOST: 127.0.0.1 FILESDIR: files TEST: ${{matrix.dbs}}