-
Notifications
You must be signed in to change notification settings - Fork 2
105 lines (89 loc) · 2.71 KB
/
integration_tests.yml
File metadata and controls
105 lines (89 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# @file .github/workflows/integration_tests.yml
#
# Copyright (c) 2025 KOMET project, OPTIMETA project, Daniel Nüst, Tom Niers
# Distributed under the GNU GPL v3. For full terms see the file LICENSE.
#
# Based on https://github.com/o2r-project/ojs-erc-plugin/blob/master/.github/workflows/cypress_test.yml.
name: geoMetadata CI Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
geoMetadata:
name: ${{ matrix.pkp-application }} version ${{ matrix.pkp-version }} with ${{ matrix.dbs }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
dbs: [
#'pgsql',
"mysql",
]
pkp-application: ["ojs"]
#'omp',
#'ops'
pkp-version: [
# "3_2_1-4" or "stable-3_2_1" # > installation does not work in Cypress, but manually it does
"3_3_0-11",
]
env:
OJS_VERSION: ${{ matrix.pkp-version }}
steps:
- name: Pre-pull images
run: |
docker pull pkpofficial/ojs:${{ matrix.pkp-version }}
docker pull mariadb:10.2
docker pull cypress/included:10.2.0
- name: Install docker-compose and msgfmt
run: |
sudo apt-get -qq update
sudo apt-get -qq install docker-compose
sudo apt-get -qq install gettext
- name: Install npm
uses: actions/setup-node@v3
with:
node-version: 14
- name: Install PHP
uses: "shivammathur/setup-php@v2"
with:
php-version: "7.4"
- name: Checkout
uses: actions/checkout@v2
- name: Install composer
uses: "ramsey/composer-install@v2"
- name: Install plugin dependencies
run: |
composer update
- name: Install test dependencies
run: |
npm install
- name: Start OJS and database
run: |
docker-compose --file cypress/docker-compose-${{ matrix.dbs }}.yml up -d
- name: Run Cypress
run: |
npx cypress run --headless --browser chrome
- name: Show logs
if: ${{ failure() }}
run: |
docker logs db
docker logs ojs
cat cypress/logs/*.log
- name: Upload screenshots
if: always()
uses: actions/upload-artifact@v2
with:
name: screenshots for ${{ matrix.pkp-application }} with ${{ matrix.dbs }}
path: |
${{ github.workspace }}/cypress/screenshots
- name: Upload videos
if: always()
uses: actions/upload-artifact@v2
with:
name: videos for ${{ matrix.pkp-application }} with ${{ matrix.dbs }}
path: |
${{ github.workspace }}/cypress/videos