Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #198

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #198

Workflow file for this run

name: Ubuntu Test and Publish
on: [push, pull_request, release]
jobs:
test:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
# - uses: hmarr/debug-action@v2
- uses: actions/checkout@v2
- name: Install dependencies
run: |
wget https://apertium.projectjj.com/apt/install-nightly.sh -O - | sudo bash
sudo apt-get -f install cg3 hfst python3-hfst
python3 -m pip install --upgrade pip setuptools
python3 -m pip install .[test]
- name: Lint with flake8
run: |
python3 -m pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=16 --max-line-length=127 --statistics
- name: Test with pytest
run: pytest -vv --cov --cov-append --cov-report xml --doctest-modules test/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
dist:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build wheel and SDist
run: pipx run build
- name: Check metadata
run: pipx run twine check dist/*
- uses: actions/upload-artifact@v2
with:
path: dist/*
publish:
needs: [dist]
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- uses: actions/download-artifact@v4.1.7
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}