chore(deps): bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #35
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: CI | |
on: | |
push: | |
branches: | |
- 'master' | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- 'master' | |
release: | |
types: [published] | |
jobs: | |
build: | |
name: Build python package | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout Code 🛎 | |
uses: actions/checkout@v2 | |
- name: Cache pip 👜 | |
uses: actions/cache@v2 | |
env: | |
# Increase this value to reset cache if setup.cfg has not changed | |
CACHE_NUMBER: 0 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ env.CACHE_NUMBER }}-${{ hashFiles('setup.cfg') }} | |
- name: Install package 🧊 | |
run: | | |
pip install .[testing] | |
- name: Run tests 📈 | |
run: | | |
python -c "import nltk;nltk.download('wordnet');nltk.download('omw')" | |
pip install spacy~=2.0 | |
python -m spacy download en_core_web_sm | |
python -m spacy download es_core_news_sm | |
pytest tests | |
pip install spacy~=3.0.0 | |
python -m spacy download en_core_web_sm | |
python -m spacy download es_core_news_sm | |
pytest tests | |
- name: Build Package 🍟 | |
run: | | |
pip install -U build | |
python -m build | |
- name: Upload package artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: python-package | |
path: dist | |
# This job will upload a Python Package using Twine when a release is created | |
# For more information see: | |
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | |
deploy_release: | |
name: Deploy Release | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'release' }} | |
needs: | |
- build | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout Code 🛎 | |
uses: actions/checkout@v2 | |
- name: Download python package | |
uses: actions/[email protected] | |
with: | |
name: python-package | |
path: dist | |
- name: Publish Package to TestPyPI 🥪 | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ | |
- name: Test Installing 🍿 | |
run: pip install --index-url https://test.pypi.org/simple --no-deps spacy-wordnet==${GITHUB_REF#refs/*/v} | |
- name: Publish Package to PyPI 🥩 | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |