Skip to content

Commit

Permalink
Reformatted github workflow yml files
Browse files Browse the repository at this point in the history
Unrelated change to fix Github actions running
Python 3.6 which is not configured.
  • Loading branch information
ubmarco committed Jun 16, 2022
1 parent 1e5ac51 commit ddff175
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 84 deletions.
43 changes: 21 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,27 @@ on:

jobs:
build-n-publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install poetry
run: |
python -m pip install poetry
- name: Build the package
run: |
poetry build
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install poetry
run: |
python -m pip install poetry
- name: Build the package
run: |
poetry build
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
122 changes: 60 additions & 62 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,86 +2,84 @@ name: Run tox tests

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
pytest:

runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [[3,7], [3,8], [3,9]]
python-version: [[3, 7], [3, 8], [3, 9]]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ join(matrix.python-version, '.') }}
uses: actions/setup-python@v2
with:
python-version: ${{ join(matrix.python-version, '.') }}

- name: Copy policy file for ubuntu-latest (needed to use ImageMagic in visual debugging tox tests)
run: |
sudo cp .github/workflows/policy.xml /etc/ImageMagick-6/policy.xml
if: matrix.os == 'ubuntu-latest'

- name: Install ghostscript
run: |
sudo apt install ghostscript
if: matrix.os == 'ubuntu-latest'

- name: Install ImageMagick on macos-latest
run: |
brew install freetype imagemagick
if: matrix.os == 'macos-latest'

- name: Install poetry and tox
run: |
python -m pip install poetry tox
- name: Run tox env pytest on Linux, macOS
run: |
tox -e py${{ join(matrix.python-version, '') }}
if: runner.os == 'Linux' || runner.os == 'macOS'

# set the shell for Windows so env var expansion works in tox and subprocesses
- name: Run tox env pytest on Windows
run: |
tox -e py${{ join(matrix.python-version, '') }}
shell: cmd
if: runner.os == 'Windows'
- uses: actions/checkout@v2

- name: Set up Python ${{ join(matrix.python-version, '.') }}
uses: actions/setup-python@v2
with:
python-version: ${{ join(matrix.python-version, '.') }}

- name: Copy policy file for ubuntu-latest (needed to use ImageMagic in visual debugging tox tests)
run: |
sudo cp .github/workflows/policy.xml /etc/ImageMagick-6/policy.xml
if: matrix.os == 'ubuntu-latest'

- name: Install ghostscript
run: |
sudo apt install ghostscript
if: matrix.os == 'ubuntu-latest'

- name: Install ImageMagick on macos-latest
run: |
brew install freetype imagemagick
if: matrix.os == 'macos-latest'

- name: Install poetry and tox
run: |
python -m pip install poetry tox
- name: Run tox env pytest on Linux, macOS
run: |
tox -e py${{ join(matrix.python-version, '') }}
if: runner.os == 'Linux' || runner.os == 'macOS'

# set the shell for Windows so env var expansion works in tox and subprocesses
- name: Run tox env pytest on Windows
run: |
tox -e py${{ join(matrix.python-version, '') }}
shell: cmd
if: runner.os == 'Windows'

flake8_pylint_docs_black:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install poetry and tox
run: |
python -m pip install poetry tox
- name: Install poetry and tox
run: |
python -m pip install poetry tox
- name: Run tox env flake8
run: |
tox -e flake8
- name: Run tox env flake8
run: |
tox -e flake8
- name: Run tox env pylint
run: |
tox -e pylint
- name: Run tox env pylint
run: |
tox -e pylint
- name: Run tox env docs
run: |
tox -e docs
- name: Run tox env docs
run: |
tox -e docs
- name: Run tox env black
run: |
tox -e black
- name: Run tox env black
run: |
tox -e black

0 comments on commit ddff175

Please sign in to comment.