Merge pull request #7 from Daemo00/pre-commit-ci-update-config #81
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 | |
on: [push, pull_request] | |
jobs: | |
new_package: | |
name: Generate a new package | |
strategy: | |
matrix: | |
python: ['3.12'] | |
platform: [ubuntu-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Allow to install Packages globally | |
run: pip install pipx | |
- name: Init Git | |
run: | | |
git config --global user.email "you@example.com" | |
git config --global user.name "Your Name" | |
- name: Create package | |
run: | | |
pipx install copier | |
pipx runpip copier install --upgrade setuptools | |
pipx install pre-commit | |
copier copy --trust --force --defaults --data="package_name=MyPackage" . MyPackage | |
- name: Check pre-commit for MyPackage | |
run: cd MyPackage && pre-commit run --all-files | |
- name: Test MyPackage | |
run: | | |
pipx install tox | |
cd MyPackage | |
tox | |
- name: Generate Documentation for MyPackage | |
run: | | |
cd MyPackage | |
pip install ".[docs]" | |
cd docs | |
make html |