Skip to content

Commit

Permalink
setup: change to reusable workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
utnapischtim committed Nov 30, 2024
1 parent a096cb4 commit fa58c25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 50 deletions.
30 changes: 4 additions & 26 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,7 @@ on:

jobs:
Publish:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel babel
- name: Build package
# Remove `compile_catalog` if the package has no translations.
run: |
python setup.py compile_catalog sdist bdist_wheel
- name: Publish on PyPI
uses: pypa/[email protected]
with:
user: __token__
# The token is provided by the inveniosoftware organization
password: ${{ secrets.pypi_token }}
uses: inveniosoftware/workflows/.github/workflows/pypi-publish.yml@master
secrets: inherit
with:
babel-compile-catalog: true
25 changes: 1 addition & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,4 @@ on:

jobs:
Tests:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.9', '3.12']
env:
EXTRAS: tests
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: setup.cfg

- name: Install dependencies
run: |
pip install .[$EXTRAS]
pip freeze
- name: Run tests
run: ./run-tests.sh
uses: inveniosoftware/workflows/.github/workflows/tests-python.yml@master

0 comments on commit fa58c25

Please sign in to comment.