Skip to content

Commit

Permalink
ga sync ojs
Browse files Browse the repository at this point in the history
  • Loading branch information
withanage committed Nov 5, 2023
1 parent 15f6c7f commit 1aee07a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Integration test
name: OJS integration test
on:
push:
branches:
Expand All @@ -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

Expand All @@ -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'}}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
14 changes: 6 additions & 8 deletions .github/workflows/workflows/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down

0 comments on commit 1aee07a

Please sign in to comment.