GitHubActions-> Changes in maven file, java and maven installed #14
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 Tests | |
on: [push] | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Docker environment | |
run: | | |
docker pull selenium/standalone-chrome:latest | |
- name: Create Selenium container | |
run: | | |
docker create --name selenium_chrome -p 4444:4444 --shm-size 2g -e GITHUB_ACTIONS=true -e CI=true selenium/standalone-chrome:latest | |
- name: Start Selenium container | |
run: docker start selenium_chrome | |
# Install Java and Maven on the Ubuntu runner | |
- name: Set up Java and Maven | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
- name: Install Maven | |
run: sudo apt-get install -y maven | |
# Run Maven command to execute tests | |
- name: Run tests with Maven | |
run: | | |
mvn clean test | |
- name: Stop and remove Selenium container | |
run: | | |
docker stop selenium_chrome | |
docker rm selenium_chrome |