update versioning to rely on pyproject.toml #11
Workflow file for this run
This file contains 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 Template Instance | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test-project-creation: | |
name: Test project creation with ${{ matrix.backend }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
backend: [setuptools, hatch, poetry] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Install Dependencies | |
run: | | |
pip install copier pre-commit | |
- name: Create new project | |
run: | | |
mkdir my-project | |
copier copy \ | |
-d project_name=test \ | |
-d project_short_description="A great package." \ | |
-d python_name=test \ | |
-d url=https://github.com/gh_actions/test \ | |
-d min_python_version=3.10 \ | |
-d org=gh_actions \ | |
-d full_name=gh_actions \ | |
-d [email protected] \ | |
-d license=BSD \ | |
-d backend=setuptools \ | |
-d typing=strict \ | |
-d coc=our_coc \ | |
--vcs-ref HEAD \ | |
. my-project | |
- name: Check generated project passes pre-commit and installs with pip | |
run: | | |
cd my-project | |
git config --global user.email "[email protected]" | |
git config --global user.name "gh_actions" | |
git init | |
git commit -am "Initial commit" | |
cat .pre-commit-config.yaml | |
pre-commit run --all-files | |
pip install -e . |