Minor adjustments to documentation for contributors #18
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-format-render | |
on: | |
push: | |
branches: [dev] | |
pull_request: | |
branches: [dev] | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.12"] | |
poetry-version: [latest] | |
os: [ubuntu-latest] | |
defaults: | |
run: | |
shell: bash | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install project | |
run: | | |
poetry install | |
- name: Run tests with pytest | |
run: | | |
poetry run pytest tests | |
outputs: | |
matrix: ${{ toJson(matrix) }} | |
render: | |
needs: test | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install project | |
run: | | |
poetry install | |
- name: Format code with black | |
run: | | |
poetry run black . | |
- name: Commit and push changes to repository | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: 'Automated code format' |