Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update github actions #161

Merged
merged 3 commits into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions {{cookiecutter.project_name}}/.github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v4
grst marked this conversation as resolved.
Show resolved Hide resolved
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: "**/pyproject.toml"
- name: Install build dependencies
run: python -m pip install --upgrade pip wheel twine build
- name: Build package
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_name}}/.github/workflows/sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
manually merge these changes.**

For more information about the template sync, please refer to the
[template documentation](https://cookiecutter-scverse-instance.readthedocs.io/en/latest/developer_docs.html#automated-template-sync).
[template documentation](https://cookiecutter-scverse-instance.readthedocs.io/en/latest/template_usage.html#automated-template-sync).
23 changes: 5 additions & 18 deletions {{cookiecutter.project_name}}/.github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,17 @@ jobs:
PYTHON: ${{ matrix.python }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: "pip"
cache-dependency-path: "**/pyproject.toml"

- name: Get pip cache dir
id: pip-cache-dir
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Restore pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: pip-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
pip-${{ runner.os }}-${{ env.pythonLocation }}-
- name: Install test dependencies
run: |
python -m pip install --upgrade pip wheel
pip install codecov
- name: Install dependencies
run: |
pip install ".[dev,test]"
Expand All @@ -56,7 +46,4 @@ jobs:
run: |
pytest -v --cov --color=yes
- name: Upload coverage
env:
CODECOV_NAME: ${{ matrix.python }}-${{ matrix.os }}
run: |
codecov --required --flags=unittests
uses: codecov/codecov-action@v3