Test #1
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: Test | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
deployment_target: | ||
description: select tests to run | ||
required: true | ||
type: choice | ||
default: all | ||
options: | ||
- all | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
name: Run tests | ||
steps: | ||
- name: Copy source code | ||
uses: actions/checkout@v4 | ||
- name: Set up Python env | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
name: Install Chrome | ||
Check failure on line 30 in .github/workflows/test_ui.yml
|
||
run: sudo apt-get install google-chrome-stable | ||
- name: Install dependencies | ||
run: pip install -r requirements.txt | ||
- name: Run tests | ||
run: pytest --alluredir=allure-results | ||
- name: Store allure results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: allure-results | ||
path: | ||
allure-results | ||
retention-days: 1 | ||
generate-report: | ||
runs-on: ubuntu-latest | ||
needs: run-tests | ||
name: Generate report | ||
steps: | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'microsoft' | ||
java-version: '17' | ||
- run: sudo wget https://github.com/allure-framework/allure2/releases/download/2.23.1/allure-2.23.1.tgz && sudo tar -zxvf allure-2.23.1.tgz -C /opt/ && sudo ln -s /opt/allure-2.23.1/bin/allure /usr/bin/allure | ||
- name: Download all workflow run artifacts | ||
uses: actions/download-artifact@v3 | ||
- run: allure generate -c allure-results -o _site | ||
- name: Store generated report | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: _site | ||
path: | ||
_site | ||
retention-days: 1 | ||
deploy-report: | ||
runs-on: ubuntu-latest | ||
needs: generate-report | ||
name: Deploy report | ||
steps: | ||
- name: Download all workflow run artifacts | ||
uses: actions/download-artifact@v3 | ||
- name: Upload Pages artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/[email protected] | ||