Skip to content

Commit

Permalink
ci: update to reusable workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
slint committed Feb 17, 2025
1 parent e42bbd5 commit 423de2e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 50 deletions.
33 changes: 13 additions & 20 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2025 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.

name: Publish

on:
push:
tags:
- v*

jobs:
build-n-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
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
run: |
python setup.py sdist bdist_wheel
- name: pypi-publish
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_token }}
Build-N-Publish:
uses: inveniosoftware/workflows/.github/workflows/pypi-publish.yml@master
secrets: inherit
36 changes: 6 additions & 30 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2020 CERN.
# Copyright (C) 2020-2025 CERN.
# Copyright (C) 2022 Graz University of Technology.
#
# Invenio is free software; you can redistribute it and/or modify it
Expand All @@ -28,32 +28,8 @@ on:
default: 'Manual trigger'

jobs:
python-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.12']
requirements-level: [pypi]

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 -e .[$EXTRAS]
pip freeze
- name: Run tests
run: |
./run-tests.sh
Python:
uses: inveniosoftware/workflows/.github/workflows/tests-python.yml@master
with:
db-service: '[""]'
search-service: '[""]'

0 comments on commit 423de2e

Please sign in to comment.