Skip to content

cd to cookiecutter template output when running commands on cookiecut… #28

cd to cookiecutter template output when running commands on cookiecut…

cd to cookiecutter template output when running commands on cookiecut… #28

name: Run template checks
on: [push]
jobs:
build-lint-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.10', '3.11']
name: Test cookiecutter template
steps:
- name: Check out source repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Run cookiecutter
run: |
pip install cookiecutter
sed -i 's/"python_version": "3\.[0-9]*"/"python_version": "${{ matrix.python-version }}"/gi' cookiecutter.json
cookiecutter --no-input ./
cd design-toolkit-application
- name: Run lint
run: |
cd design-toolkit-application
./ci/linux/lint.sh
- name: Run unit tests
run: |
cd design-toolkit-application
./ci/linux/test_unit.sh
- name: Surface failing tests
if: always()
uses: pmeier/pytest-results-action@main
with:
# A list of JUnit XML files, directories containing the former, and wildcard
# patterns to process.
# See @actions/glob for supported patterns.
path: ./design-toolkit-application/test-results.xml
# Add a summary of the results at the top of the report
# Default: true
summary: true
# Select which results should be included in the report.
# Follows the same syntax as
# `pytest -r`
# Default: fEX
display-options: fEX
# Fail the workflow if no JUnit XML was found.
# Default: true
fail-on-empty: false
- name: Add mypy annotator
uses: pr-annotators/mypy-pr-annotator@v1.0.0
- name: Run typechecker
run: |
cd design-toolkit-application
./ci/linux/typecheck.sh