Skip to content

Commit

Permalink
Merge pull request #10 from AstarVienna/hb/reuseworkflow
Browse files Browse the repository at this point in the history
Reuse workflow and fix windows for minimal dependencies
  • Loading branch information
hugobuddel committed May 6, 2023
2 parents 23fdd5b + 4e48965 commit 4221e26
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/minimumdependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ on:
branches:
- master

# Allows you to run this workflow manually from the Actions tab
# 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
- # Run every day at 5:00 UTC.
- cron: "0 5 * * *"

jobs:
Expand All @@ -38,11 +41,15 @@ jobs:
run: |
# Hardcode the minimum version of the dependencies.
# E.g. '"astropy>=4.0"' to '"astropy==4.0"'
# .bak is necessary for MacOS compatibility.
sed -i.bak "s/>=/==/g" pyproject.toml
# -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 -i.bak 's/requires-python = "==3.8"/requires-python = "==3.8.*"/g' pyproject.toml
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
Expand Down

0 comments on commit 4221e26

Please sign in to comment.