99 pull_request :
1010
1111jobs :
12- lint :
13- name : Lint
14- runs-on : ubuntu-latest
15- steps :
16- - name : Checkout
17- uses : actions/checkout@v2
18- - name : Setup
19- uses : actions/setup-python@v2
20- with :
21- python-version : " 3.7"
22- - name : Install and run linters
23- run : |
24- pip install pipenv
25- pipenv install --dev
26- pipenv run pylint ing_ynab
27- pipenv run black --check ing_ynab
2812 check :
29- name : Check setup.py requirements
13+ name : Check
3014 runs-on : ubuntu-latest
3115 steps :
32- - name : Checkout
33- uses : actions/checkout@v2
34- - name : Setup
35- uses : actions/setup-python@v2
16+ - uses : actions/checkout@v4
17+ - uses : actions/setup-python@v5
3618 with :
37- python-version : " 3.7"
38- - name : Verify dependencies
39- run : |
40- pip install pipenv
41- pipenv install --dev
42- pipenv run pipenv-setup check
19+ python-version : " 3.12"
20+ - uses : pdm-project/setup-pdm@v3
21+ - run : pdm sync -d
22+ - run : pdm run ruff check
23+ - run : pdm run ruff format --check
4324 test :
4425 name : Test
4526 runs-on : ubuntu-latest
4627 steps :
47- - name : Checkout
48- uses : actions/checkout@v2
49- - name : Setup
50- uses : actions/setup-python@v2
28+ - uses : actions/checkout@v4
29+ - uses : actions/setup-python@v5
5130 with :
52- python-version : " 3.7"
53- - name : Install and run pytest
54- run : |
55- pip install pipenv
56- pipenv install --dev
57- pipenv run python -m pytest
31+ python-version : " 3.12"
32+ - uses : pdm-project/setup-pdm@v3
33+ - run : pdm sync -d
34+ - run : pdm run pytest
5835 docker :
5936 name : Docker
6037 runs-on : ubuntu-latest
6138 needs :
62- - lint
6339 - check
6440 - test
6541 steps :
66- - name : Checkout
67- uses : actions/checkout@v2
68- - name : Login
42+ - uses : actions/checkout@v4
43+ - name : Log into docker
6944 run : docker login docker.pkg.github.com -u bahlo -p "${{ secrets.GITHUB_TOKEN }}"
7045 - name : Build docker container
7146 if : github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags')
@@ -86,21 +61,15 @@ jobs:
8661 runs-on : ubuntu-latest
8762 if : startsWith(github.ref, 'refs/tags')
8863 needs :
89- - lint
9064 - check
9165 - test
9266 steps :
93- - name : Checkout
94- uses : actions/checkout@v2
95- - name : Setup
96- uses : actions/setup-python@v2
97- with :
98- python-version : " 3.7"
99- - name : Build module
100- run : |
101- pip3 install setuptools wheel
102- python3 setup.py sdist bdist_wheel
103- - name : Publish distribution to Test PyPI
104- uses : pypa/gh-action-pypi-publish@master
67+ - uses : actions/checkout@v4
68+ - uses : actions/setup-python@v5
10569 with :
106- password : ${{ secrets.PYPI_TOKEN }}
70+ python-version : " 3.12"
71+ - uses : pdm-project/setup-pdm@v3
72+ - run : pdm publish
73+ env :
74+ PDM_PUBLISH_USERNAME : " __token__"
75+ PDM_PUBLISH_PASSWORD : " ${{ secrets.PYPI_TOKEN }}"
0 commit comments