ci: fix jinja2 variable reference in codacy coverage reporter condition #150
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: building | |
on: | |
push: | |
release: | |
types: [published] | |
jobs: | |
Test_Python_37: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.7] | |
jinja2: [ | |
jinja2==3.0.*, | |
jinja2 | |
] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run Test | |
uses: ./.github/actions/liquidpy_test | |
with: | |
python_version: ${{ matrix.python-version }} | |
jinja2_version: ${{ matrix.jinja2 }} | |
Test_Python_38_plus: | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] | |
jinja2: [ | |
jinja2==3.0.*, | |
jinja2 | |
] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run Test | |
uses: ./.github/actions/liquidpy_test | |
with: | |
python_version: ${{ matrix.python-version }} | |
jinja2_version: ${{ matrix.jinja2 }} | |
- name: Run codacy-coverage-reporter | |
uses: codacy/codacy-coverage-reporter-action@master | |
if: matrix.python-version == '3.12' && matrix.jinja2 == 'jinja2' | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: cov.xml | |
deploy: | |
needs: Test_Python_38_plus | |
runs-on: ubuntu-24.04 | |
if: github.event_name == 'release' | |
strategy: | |
matrix: | |
python-version: [3.12] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python # Set Python version | |
uses: actions/setup-python@v5 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install poetry | |
- name: Publish to PyPI | |
run: poetry publish --build -u ${{ secrets.PYPI_USER }} -p ${{ secrets.PYPI_PASSWORD }} | |
if: success() |