From 88ccbf785ef892a742ab4785d05b69539fac1562 Mon Sep 17 00:00:00 2001 From: Hugo Buddelmeijer Date: Fri, 7 Jul 2023 15:50:51 +0200 Subject: [PATCH] Use DevOps workflow --- .github/workflows/minimumdependencies.yml | 37 ++--------------------- .github/workflows/tests.yml | 23 ++------------ 2 files changed, 5 insertions(+), 55 deletions(-) diff --git a/.github/workflows/minimumdependencies.yml b/.github/workflows/minimumdependencies.yml index f0009e5..e11ff36 100644 --- a/.github/workflows/minimumdependencies.yml +++ b/.github/workflows/minimumdependencies.yml @@ -14,43 +14,10 @@ on: # Allows you to run this workflow manually from the Actions tab. workflow_dispatch: - # Allow this workflow to be called from other repositories. - workflow_call: - schedule: - # Run every day at 5:00 UTC. - cron: "0 5 * * *" jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - # Keep python-version on the lowest version from pyproject.toml. - # Also update the regexp below. - python-version: 3.8 - - name: Install dependencies - run: | - # Hardcode the minimum version of the dependencies. - # E.g. '"astropy>=4.0"' to '"astropy==4.0"' - # -i cannot be used because that is hard to get compatible with - # Linux, MacOS, and Windows. - # Single quotes are necessary for Windows compatibility. - sed 's/>=/==/g' pyproject.toml > pyproject.toml.new - cp pyproject.toml.new pyproject.toml - # It is difficult to make a regexp that generalizes the Python - # version and also works Linux, Windows, and MacOS. - sed 's/==3.8/==3.8.*/g' pyproject.toml > pyproject.toml.new2 - cp pyproject.toml.new2 pyproject.toml - python -m pip install --upgrade pip - pip install .[test] - - name: Run Pytest - run: pytest + call-minimum-dependencies: + uses: AstarVienna/DevOps/.github/workflows/minimumdependencies.yml@master diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 50354be..99c5565 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,5 @@ name: Tests + on: push: branches: @@ -11,23 +12,5 @@ on: workflow_dispatch: jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ['3.8', '3.9', '3.10', '3.11'] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install .[test] - - name: Run Pytest - run: pytest + call-tests: + uses: AstarVienna/DevOps/.github/workflows/tests.yml@master