Skip to content

Commit

Permalink
* Consistent quotes in workflow YAML file
Browse files Browse the repository at this point in the history
* Reformat workflow YAML file automatically
* Add step names for all steps
  • Loading branch information
Mateusz Kopeć committed Dec 13, 2024
1 parent 0dc9fb8 commit 3517e8d
Showing 1 changed file with 31 additions and 25 deletions.
56 changes: 31 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,37 @@ jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
python: ['3.9', '3.10', '3.11', '3.12']
numpy_version: ["numpy-latest", "numpy<2"]
os: [ ubuntu-latest ]
python: [ "3.9", "3.10", "3.11", "3.12" ]
numpy_version: [ "numpy-latest", "numpy<2" ]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ "${{ matrix.numpy_version }}" = "numpy<2" ]; then
pip install ".[test,test_numpy_pre2]"
else
pip install ".[test]"
fi
- name: Test with pytest
run: |
pytest tests
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}

- name: Use cache for pip dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles("**/pyproject.toml") }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ "${{ matrix.numpy_version }}" = "numpy<2" ]; then
pip install ".[test,test_numpy_pre2]"
else
pip install ".[test]"
fi
- name: Test with pytest
run: |
pytest tests

0 comments on commit 3517e8d

Please sign in to comment.