From fa58c25f3973fd48e6414741b49684905e1eab77 Mon Sep 17 00:00:00 2001 From: Christoph Ladurner Date: Sat, 30 Nov 2024 16:25:54 +0100 Subject: [PATCH] setup: change to reusable workflows --- .github/workflows/pypi-publish.yml | 30 ++++-------------------------- .github/workflows/tests.yml | 25 +------------------------ 2 files changed, 5 insertions(+), 50 deletions(-) diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 2657cbc8..68d519ff 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -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/gh-action-pypi-publish@v1.3.1 - 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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b61fc764..29534ef7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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