This repository has been archived by the owner on Mar 30, 2024. It is now read-only.
Selenium workflow fix #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |