v1.0.0 #40
Workflow file for this run
This file contains hidden or 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: | |
| release: | |
| types: | |
| - published | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| run-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.10" | |
| - name: Install and configure Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: 1.7.1 | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| installer-parallel: true | |
| - name: Install dependencies | |
| run: | | |
| poetry install --no-interaction | |
| - name: Test code | |
| continue-on-error: true | |
| run: | | |
| export CICD_TESTING_ENV=true | |
| source .venv/bin/activate | |
| behave --format=json --outfile=report.json --verbose --summary || true | |
| python scripts/json_to_md.py | |
| - name: Output reports to the job summary | |
| shell: bash | |
| run: | | |
| if [ -f md_report.md ]; then | |
| echo "<details><summary>Test Report</summary>" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| cat md_report.md >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "</details>" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| - name: Render the report to the PR | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| header: Test Report | |
| recreate: true | |
| path: md_report.md |