Skip to content

Commit

Permalink
ci: update to use setup-python
Browse files Browse the repository at this point in the history
Also, remove the scripts directory.
  • Loading branch information
gadomski committed Oct 16, 2023
1 parent 3eeef98 commit 49180fa
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 118 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,38 @@ on:

jobs:
standard:
name: Standard
name: Lint and test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Set up pip cache
uses: actions/[email protected]
- uses: actions/setup-python@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py', '**/requirements-dev.txt') }}
restore-keys: ${{ runner.os }}-pip-
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install
run: pip install '.[dev]'
- name: Lint
run: pre-commit run --all-files
- name: Test
run: ./scripts/cibuild
run: pytest
codecov:
name: Codecov
needs:
- standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Execute linters and test suites
run: ./scripts/cibuild
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
- name: Install
run: pip install '.[dev]'
- name: Test
run: pytest --cov=stactask
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,16 @@ pip install -e '.[dev]'
pre-commit install
```

To run the complete test and linting suite:
To run the tests:

```shell
./scripts/test
pytest
```

To just run the tests:
To lint all the files:

```shell
pytest
pre-commit run --all-files
```

## Contributing
Expand Down
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
comment: off
comment: false

coverage:
status:
project:
default:
target: auto
threshold: 5
threshold: "5"
22 changes: 0 additions & 22 deletions scripts/check

This file was deleted.

23 changes: 0 additions & 23 deletions scripts/cibuild

This file was deleted.

32 changes: 0 additions & 32 deletions scripts/test

This file was deleted.

23 changes: 0 additions & 23 deletions scripts/update

This file was deleted.

0 comments on commit 49180fa

Please sign in to comment.