Skip to content

Commit

Permalink
ci: update ci pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
tmorrell committed Jul 8, 2024
1 parent bd2c7d7 commit f0dd9f7
Showing 1 changed file with 24 additions and 26 deletions.
50 changes: 24 additions & 26 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2020 CERN.
# Copyright (C) 2020-2024 CERN.
# Copyright (C) 2020 Northwestern University.
# Copyright (C) 2022 Graz University of Technology.
#
# Invenio is free software; you can redistribute it and/or modify it
# Datacite 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: CI

on:
push:
branches: master
branches:
- master
- "feature/*"
- "maint-**"
pull_request:
branches: master
branches:
- master
- "maint-**"
- "feature/**"
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-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
requirements-level: [pypi]
python-version: [3.9, 3.12]

steps:
- name: Checkout
Expand All @@ -39,24 +46,15 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Generate dependencies
run: |
pip install wheel requirements-builder
requirements-builder -e all --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }}
cache: pip
cache-dependency-path: setup.cfg

- name: Install dependencies
run: |
pip install -r .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
pip install .[all]
pip install ".[$EXTRAS]"
pip freeze
- name: Run tests
run: |
./run-tests.sh
run: ./run-tests.sh


0 comments on commit f0dd9f7

Please sign in to comment.