This repository has been archived by the owner on Mar 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (59 loc) · 1.84 KB
/
selenium.yml
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
name: selenium
on:
pull_request:
workflow_dispatch:
jobs:
build:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
# https://github.com/actions/setup-java#supported-distributions
distribution: 'microsoft'
java-version: 11
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Start containers
run: |
git clone https://github.com/svjis/svjis-docker.git
cd svjis-docker/docker-compose
docker-compose -f svjis-dev.yml up -d
- name: Create schema
run: |
cd svjis-docker/docker-compose
curl -k -L -o ./database.sql -L https://raw.githubusercontent.com/svjis/svjis/master/db_schema/database.sql
docker cp ./database.sql svjis_db:/firebird/
docker cp ./create-schema.sh svjis_db:/firebird/
docker exec svjis_db bash "/firebird/create-schema.sh"
- name: Test of docker-compose
run: |
string="New Company"
if curl -s "http://localhost:8080" | grep -q "$string"; then
echo "'$string' found"
else
curl "http://localhost:8080"
echo "'$string' not found"
exit 1
fi
- name: Install Google Chrome
run: |
npx @puppeteer/browsers install chrome@stable
google-chrome --version
- name: Run test
run: mvn --no-transfer-progress package --file pom.xml
- name: Archive screen shots
uses: actions/upload-artifact@v3
with:
name: Screenshots
path: target/*.png
- name: Stop containers
if: always()
run: |
cd svjis-docker/docker-compose
docker-compose -f svjis-dev.yml down