Skip to content

Commit

Permalink
ci(github-acitons): pin poetry version to 1.3.2 due to python-poetry/…
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee-W committed Aug 26, 2023
1 parent e32e91b commit 37f1371
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 48 deletions.
59 changes: 30 additions & 29 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
name: Python package

on: [workflow_dispatch, pull_request]
on: [ workflow_dispatch, pull_request ]

jobs:
python-check:
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
platform: [ubuntu-20.04, macos-latest, windows-latest]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
platform: [ ubuntu-20.04, macos-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -U pip poetry
poetry --version
poetry install
- name: Run tests and linters
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
./scripts/test
shell: bash
- name: Upload coverage to Codecov
if: runner.os == 'Linux'
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
# pin poetry to 1.3.2 due to https://github.com/python-poetry/poetry/issues/7611
python -m pip install -U pip poetry==1.3.2
poetry --version
poetry install
- name: Run tests and linters
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
./scripts/test
shell: bash
- name: Upload coverage to Codecov
if: runner.os == 'Linux'
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
39 changes: 20 additions & 19 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,23 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}'
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install -U pip poetry mkdocs mkdocs-material
poetry --version
poetry install
- name: Publish
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
./scripts/publish
- uses: actions/checkout@v3
with:
token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}'
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
# pin poetry to 1.3.2 due to https://github.com/python-poetry/poetry/issues/7611
python -m pip install -U pip poetry==1.3.2 mkdocs mkdocs-material
poetry --version
poetry install
- name: Publish
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
./scripts/publish

0 comments on commit 37f1371

Please sign in to comment.