Skip to content

Update {% if use_precommit %}.pre-commit-config.yaml{% endif %}.jinja #7

Update {% if use_precommit %}.pre-commit-config.yaml{% endif %}.jinja

Update {% if use_precommit %}.pre-commit-config.yaml{% endif %}.jinja #7

Workflow file for this run

name: Build
on:
push:
pull_request:
workflow_dispatch:
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Add poetry to path
run: echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
- name: Set up cache
uses: actions/cache@v4
id: cached-poetry-dependencies
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction
- name: Test
run: poetry run copier copy -a ./.github/assets/.copier-answers.yml --force ./project ./dist