Skip to content

Commit 1ff627b

Browse files
committed
setup: change to reusable workflows
1 parent 6f08288 commit 1ff627b

File tree

2 files changed

+6
-60
lines changed

2 files changed

+6
-60
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,5 @@ on:
1515

1616
jobs:
1717
Publish:
18-
runs-on: ubuntu-20.04
19-
20-
steps:
21-
- name: Checkout
22-
uses: actions/checkout@v2
23-
24-
- name: Set up Python
25-
uses: actions/setup-python@v2
26-
with:
27-
python-version: 3.8
28-
29-
- name: Install dependencies
30-
run: |
31-
python -m pip install --upgrade pip
32-
pip install setuptools wheel babel
33-
34-
- name: Build package
35-
run: python setup.py sdist bdist_wheel
36-
37-
- name: Publish on PyPI
38-
uses: pypa/[email protected]
39-
with:
40-
user: __token__
41-
# The token is provided by the inveniosoftware organization
42-
password: ${{ secrets.pypi_token }}
18+
uses: inveniosoftware/workflows/.github/workflows/pypi-publish.yml@master
19+
secrets: inherit

.github/workflows/tests.yml

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -25,38 +25,7 @@ on:
2525

2626
jobs:
2727
Tests:
28-
runs-on: ubuntu-20.04
29-
strategy:
30-
matrix:
31-
python-version: [3.7, 3.8, 3.9]
32-
requirements-level: [pypi]
33-
34-
steps:
35-
- name: Checkout
36-
uses: actions/checkout@v2
37-
38-
- name: Set up Python ${{ matrix.python-version }}
39-
uses: actions/setup-python@v2
40-
with:
41-
python-version: ${{ matrix.python-version }}
42-
43-
- name: Generate dependencies
44-
run: |
45-
pip install wheel requirements-builder
46-
requirements-builder -e tests --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
47-
48-
- name: Cache pip
49-
uses: actions/cache@v2
50-
with:
51-
path: ~/.cache/pip
52-
key: ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }}
53-
54-
- name: Install dependencies
55-
run: |
56-
pip install -r .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
57-
pip install .[all]
58-
pip freeze
59-
60-
- name: Run tests
61-
run: |
62-
./run-tests.sh
28+
uses: inveniosoftware/workflows/.github/workflows/tests-python.yml@master
29+
with:
30+
db-service: '[""]'
31+
search-service: '[""]'

0 commit comments

Comments
 (0)