Archive build artifacts, download at next jobs #15
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: Continuous-Integration | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: ~ | |
jobs: | |
build: | |
name: Build solution | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Build solution | |
shell: cmd | |
run: mvn clean install -DskipTests -Dstyle.color=always | |
- name: Archive build artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build-artifacts | |
path: target/ | |
api-tests: | |
name: API | |
runs-on: windows-latest | |
needs: | |
- build | |
steps: | |
- name: Download build artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: build-artifacts | |
path: target/ | |
- name: Run API tests | |
shell: cmd | |
run: mvn test -DsuiteXmlFile=TestNG.xml -Dstyle.color=always -Dcucumber.filter.tags="@API" | |
web-tests: | |
name: WEB | |
runs-on: windows-latest | |
needs: | |
- build | |
steps: | |
- name: Download build artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: build-artifacts | |
path: target/ | |
- name: Run WEB tests | |
shell: cmd | |
run: mvn test -DsuiteXmlFile=TestNG.xml -Dstyle.color=always -Dcucumber.filter.tags="@WEB" | |
- name: Archive test evidences | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: web-test-evidences | |
path: 'C:\temp\selenoid\video' |