Skip to content

Commit deb435d

Browse files
authored
Merge pull request #57 from consideRatio/pr/update-github-workflows
ci: refresh github workflows
2 parents f2677a3 + d8af679 commit deb435d

File tree

4 files changed

+74
-31
lines changed

4 files changed

+74
-31
lines changed

.github/dependabot.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# dependabot.yaml reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2+
#
3+
# Notes:
4+
# - Status and logs from dependabot are provided at
5+
# https://github.com/jupyterhub/firstuseauthenticator/network/updates.
6+
#
7+
version: 2
8+
updates:
9+
# Maintain dependencies in our GitHub Workflows
10+
- package-ecosystem: github-actions
11+
directory: /
12+
labels: [ci]
13+
schedule:
14+
interval: monthly
15+
time: "05:00"
16+
timezone: Etc/UTC

.github/workflows/release.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
11
# Build releases and (on tags) publish to PyPI
22
name: Release
33

4-
# always build releases (to make sure wheel-building works)
5-
# but only publish to PyPI on tags
4+
# Always tests wheel building, but only publish to PyPI on pushed tags.
65
on:
7-
push:
86
pull_request:
7+
paths-ignore:
8+
- ".github/workflows/*.yaml"
9+
- "!.github/workflows/release.yaml"
10+
push:
11+
paths-ignore:
12+
- ".github/workflows/*.yaml"
13+
- "!.github/workflows/release.yaml"
14+
branches-ignore:
15+
- "dependabot/**"
16+
- "pre-commit-ci-update-config"
17+
tags: ["**"]
18+
workflow_dispatch:
919

1020
jobs:
1121
release:
12-
runs-on: ubuntu-20.04
22+
runs-on: ubuntu-latest
1323
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-python@v2
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-python@v5
1626
with:
17-
python-version: 3.9
27+
python-version: "3.12"
1828

1929
- name: install build package
2030
run: |
@@ -28,7 +38,7 @@ jobs:
2838
ls -l dist
2939
3040
- name: publish to pypi
31-
uses: pypa/gh-action-pypi-publish@v1.4.1
41+
uses: pypa/gh-action-pypi-publish@release/v1
3242
if: startsWith(github.ref, 'refs/tags/')
3343
with:
3444
user: __token__

.github/workflows/test.yaml

Lines changed: 40 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,60 @@
1+
# This is a GitHub workflow defining a set of jobs with a set of steps.
2+
# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
3+
#
14
name: Tests
25

36
on:
47
pull_request:
8+
paths-ignore:
9+
- "**.md"
10+
- ".github/workflows/*.yaml"
11+
- "!.github/workflows/test.yaml"
512
push:
13+
paths-ignore:
14+
- "**.md"
15+
- ".github/workflows/*.yaml"
16+
- "!.github/workflows/test.yaml"
17+
branches-ignore:
18+
- "dependabot/**"
19+
- "pre-commit-ci-update-config"
20+
tags: ["**"]
621
workflow_dispatch:
722

8-
env:
9-
# pytest colors: https://github.com/pytest-dev/pytest/issues/7443
10-
FORCE_COLOR: "1"
11-
1223
jobs:
1324
test:
14-
runs-on: ubuntu-20.04
25+
runs-on: ${{ matrix.runs-on }}
1526
timeout-minutes: 10
1627

1728
strategy:
1829
# Keep running even if one variation of the job fail
1930
fail-fast: false
2031
matrix:
21-
python:
22-
- "3.6"
23-
- "3.7"
24-
- "3.8"
25-
- "3.9"
26-
- "3.10"
32+
include:
33+
- python-version: "3.6"
34+
runs-on: ubuntu-20.04
35+
- python-version: "3.7"
36+
runs-on: ubuntu-22.04
37+
- python-version: "3.8"
38+
runs-on: ubuntu-22.04
39+
- python-version: "3.9"
40+
runs-on: ubuntu-latest
41+
- python-version: "3.10"
42+
runs-on: ubuntu-latest
43+
- python-version: "3.11"
44+
runs-on: ubuntu-latest
45+
- python-version: "3.12"
46+
runs-on: ubuntu-latest
47+
- python-version: "3.x"
48+
runs-on: ubuntu-latest
2749

2850
steps:
29-
- uses: actions/checkout@v2
30-
31-
- name: Install Python ${{ matrix.python }}
32-
uses: actions/setup-python@v2
51+
- uses: actions/checkout@v4
52+
- uses: actions/setup-python@v5
3353
with:
34-
python-version: ${{ matrix.python }}
54+
python-version: ${{ matrix.python-version }}
3555

3656
# preserve pip cache to speed up installation
37-
- name: Cache pip
38-
uses: actions/cache@v2
57+
- uses: actions/cache@v4
3958
with:
4059
path: ~/.cache/pip
4160
# Look to see if there is a cache hit for the corresponding requirements file
@@ -51,8 +70,7 @@ jobs:
5170
5271
- name: Run tests
5372
run: |
54-
pytest -v --cov=firstuseauthenticator
73+
pytest -v --color=yes --cov=firstuseauthenticator
5574
56-
- name: Submit codecov report
57-
run: |
58-
codecov
75+
# GitHub action reference: https://github.com/codecov/codecov-action
76+
- uses: codecov/codecov-action@v4

dev-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
pytest
22
pytest-asyncio
33
pytest-cov
4-
codecov

0 commit comments

Comments
 (0)