Skip to content

chore: remove unecessary files #615

chore: remove unecessary files

chore: remove unecessary files #615

Workflow file for this run

name: Test Jinja2
permissions: read-all
"on":
workflow_dispatch:
pull_request:
push:
branches:
- master
- renovate/**
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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: set up python 3
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
with:
python-version: "3.10"
- name: setup/activate pre-commit cache
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # 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@a283f9441d2d96eb62436dc46d7014f5d357ac22 # v3
timeout-minutes: 30