This repository has been archived by the owner on Mar 30, 2024. It is now read-only.
selenium #56
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: | |
push: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
docker: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
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: | | |
cd docker-compose | |
docker-compose -f svjis-dev.yml up -d | |
- name: Create schema | |
run: | | |
cd 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 selenium test | |
run: | | |
git clone https://github.com/svjis/svjis-selenium.git | |
cd svjis-selenium | |
mvn test --no-transfer-progress | |
- name: Archive screen shots | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Screenshots | |
path: svjis-selenium/target/*.png | |
- name: Stop containers | |
if: always() | |
run: | | |
cd docker-compose | |
docker-compose -f svjis-dev.yml down |