Skip to content

Commit c899dbe

Browse files
authored
Merge pull request pycountry#257 from zware/updates
Update and simplify GHA configuration
2 parents e74d49d + ab772fa commit c899dbe

File tree

2 files changed

+12
-67
lines changed

2 files changed

+12
-67
lines changed

.github/workflows/mypy-check.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,29 @@
1-
# This is a basic workflow to help you get started with Actions
2-
31
name: Unit tests
42

5-
# Controls when the action will run. Triggers the workflow on push or pull request
6-
# events but only for the main branch
73
on:
84
push:
95
branches: [ main ]
106
pull_request:
117
branches: [ main ]
128

13-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
149
jobs:
15-
# This workflow contains a single job called "build"
1610
build:
1711
strategy:
1812
matrix:
1913
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ]
20-
21-
# The type of runner that the job will run on
2214
runs-on: ubuntu-latest
23-
24-
# Steps represent a sequence of tasks that will be executed as part of the job
2515
steps:
26-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
27-
- uses: actions/checkout@v2
28-
- uses: actions/setup-python@v2
16+
- uses: actions/checkout@v4
17+
- name: Install poetry
18+
run: pipx install poetry
19+
- uses: actions/setup-python@v5
2920
with:
3021
python-version: ${{ matrix.python-version }}
31-
32-
# Poetry bootstrap taken from
33-
# https://jacobian.org/til/github-actions-poetry/
34-
35-
- name: cache poetry install
36-
uses: actions/cache@v2
37-
with:
38-
path: ~/.local
39-
key: poetry-1.7.1-py${{ matrix.python-version }}
40-
- uses: snok/install-poetry@v1
41-
with:
42-
version: 1.7.1
43-
virtualenvs-create: true
44-
virtualenvs-in-project: true
45-
- name: cache deps
46-
id: cache-deps
47-
uses: actions/cache@v2
48-
with:
49-
path: .venv
50-
key: py${{ matrix.python-version}}deps-${{ hashFiles('**/poetry.lock') }}
51-
- run: poetry install --no-interaction --no-root
52-
if: steps.cache-deps.outputs.cache-hit != 'true'
53-
54-
- run: poetry install
55-
- run: poetry run pytest -vv
22+
cache: 'poetry'
23+
24+
- name: Install dependencies
25+
run: poetry install
26+
- name: Run MyPy type check
27+
run: poetry run mypy
28+
- name: Run tests
29+
run: poetry run pytest -vv

0 commit comments

Comments
 (0)