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 28, 2024
1 parent 08dbf9d commit 6695a0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 64 deletions.
28 changes: 2 additions & 26 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,5 @@ 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
44 changes: 6 additions & 38 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,48 +16,16 @@ on:
branches: master
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 3 * * 6'
- cron: "0 3 * * 6"
workflow_dispatch:
inputs:
reason:
description: 'Reason'
description: "Reason"
required: false
default: 'Manual trigger'
default: "Manual trigger"

jobs:
Tests:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.9, 3.12]
db-service: [postgresql14, mysql8]
include:
- db-service: postgresql14
DB_EXTRAS: "postgresql"

- db-service: mysql8
DB_EXTRAS: "mysql"

env:
DB: ${{ matrix.db-service }}
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
docker version
- name: Run tests
run: |
./run-tests.sh
uses: inveniosoftware/workflows/.github/workflows/tests-python.yml@master
with:
search-service: '[""]'

0 comments on commit 6695a0c

Please sign in to comment.