Skip to content

chore(deps): pin pascalgn/size-label-action action to 1619680 #445

chore(deps): pin pascalgn/size-label-action action to 1619680

chore(deps): pin pascalgn/size-label-action action to 1619680 #445

Workflow file for this run

name: Test Jinja2
permissions: read-all
"on":
workflow_dispatch:
pull_request:
push:
branches:
- master
paths:
- ".github/workflows/ci.yml"
- ".github/cookiecutter-example.yml"
- "{{ cookiecutter.project_slug }}/**"
- "cookiecutter.json"
- "requirements-dev.txt"
jobs:
test-latest:
name: Test
runs-on: ubuntu-latest
steps:
### GENERIC COOKIECUTTER INITIALIZATION STEPS ###
- name: check out the codebase
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- name: set up python 3
uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # v4
with:
python-version: "3.x"
- name: setup/activate pre-commit cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ~/.cache/pre-commit
key: ${{ hashFiles('**/.pre-commit-config.yaml') }}
- name: install cookiecutter development dependencies
run: |
python3 -m venv cookiecutter-venv
source cookiecutter-venv/bin/activate
python3 -m pip install -r requirements-dev.txt
- name: Generate example project from cookiecutter.
run: |
source cookiecutter-venv/bin/activate
cookiecutter . --config-file .github/cookiecutter-example.yml --no-input
- name: install development dependencies of generated project
run: |
python3 -m venv project-venv
source project-venv/bin/activate
pip3 install -r requirements-dev.txt
working-directory: ./ansible-role-myrole
- name: Run pre-commit on all files in generated project
run: |
git init
git add .
source project-venv/bin/activate
pre-commit run --all-files --show-diff-on-failure
working-directory: ./ansible-role-myrole
### COOKIECUTTER SPECIFIC STEPS ###
- name: Run tox in generated project
run: |
source project-venv/bin/activate
tox
working-directory: ./ansible-role-myrole
- name: setup tmate session if any previous step failed and if this is a manual run
if: ${{ failure() && github.event_name == 'workflow_dispatch' }}
uses: mxschmitt/action-tmate@1005f9c9db5f1b055a495e72c6e589764984baf6 # v3
timeout-minutes: 30