mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-22 20:51:58 +00:00
workflows: change to reusable workflows
This commit is contained in:
21
.github/workflows/pypi-publish.yml
vendored
21
.github/workflows/pypi-publish.yml
vendored
@@ -5,22 +5,5 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-n-publish:
|
build-n-publish:
|
||||||
runs-on: ubuntu-latest
|
uses: tu-graz-library/.github/.github/workflows/pypi-publish.yml@main
|
||||||
steps:
|
secrets: inherit
|
||||||
- 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 compile_catalog sdist bdist_wheel
|
|
||||||
- name: pypi-publish
|
|
||||||
uses: pypa/gh-action-pypi-publish@v1.3.1
|
|
||||||
with:
|
|
||||||
user: __token__
|
|
||||||
password: ${{ secrets.pypi_password }}
|
|
||||||
|
|||||||
49
.github/workflows/tests.yml
vendored
49
.github/workflows/tests.yml
vendored
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright (C) 2020-2022 Graz University of Technology.
|
# Copyright (C) 2020-2024 Graz University of Technology.
|
||||||
#
|
#
|
||||||
# invenio-theme-tugraz is free software; you can redistribute it and/or
|
# invenio-theme-tugraz is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the MIT License; see LICENSE file for more
|
# modify it under the terms of the MIT License; see LICENSE file for more
|
||||||
@@ -24,48 +24,5 @@ on:
|
|||||||
default: 'Manual trigger'
|
default: 'Manual trigger'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Tests:
|
tests:
|
||||||
runs-on: ubuntu-20.04
|
uses: tu-graz-library/.github/.github/workflows/tests.yml@main
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
python-version: [3.9, "3.10"]
|
|
||||||
requirements-level: [pypi]
|
|
||||||
db-service: [postgresql13]
|
|
||||||
search-service: [opensearch2]
|
|
||||||
include:
|
|
||||||
- search-service: opensearch2
|
|
||||||
SEARCH_EXTRAS: "opensearch2"
|
|
||||||
|
|
||||||
env:
|
|
||||||
DB: ${{ matrix.db-service }}
|
|
||||||
SEARCH: ${{ matrix.search-service }}
|
|
||||||
EXTRAS: tests,${{ matrix.SEARCH_EXTRAS }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
|
|
||||||
- name: Generate dependencies
|
|
||||||
run: |
|
|
||||||
pip install wheel requirements-builder
|
|
||||||
requirements-builder -e "$EXTRAS" --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
|
|
||||||
- name: Cache pip
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
pip install -r .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
|
|
||||||
pip install ".[$EXTRAS]"
|
|
||||||
pip freeze
|
|
||||||
docker --version
|
|
||||||
docker-compose --version
|
|
||||||
- name: Run tests
|
|
||||||
run: |
|
|
||||||
./run-tests.sh
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright (C) 2020-2021 Graz University of Technology.
|
# Copyright (C) 2020-2024 Graz University of Technology.
|
||||||
#
|
#
|
||||||
# invenio-theme-tugraz is free software; you can redistribute it and/or
|
# invenio-theme-tugraz is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the MIT License; see LICENSE file for more
|
# modify it under the terms of the MIT License; see LICENSE file for more
|
||||||
@@ -27,6 +27,7 @@ classifiers =
|
|||||||
Topic :: Software Development :: Libraries :: Python Modules
|
Topic :: Software Development :: Libraries :: Python Modules
|
||||||
Programming Language :: Python :: 3.9
|
Programming Language :: Python :: 3.9
|
||||||
Programming Language :: Python :: 3.10
|
Programming Language :: Python :: 3.10
|
||||||
|
Programming Language :: Python :: 3.11
|
||||||
Development Status :: 3 - Alpha
|
Development Status :: 3 - Alpha
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
|
|||||||
Reference in New Issue
Block a user