@@ -2,93 +2,101 @@ name: Continuous Integration
2
2
on : [push, pull_request]
3
3
env :
4
4
PROJECT_NAME : recode
5
+
5
6
jobs :
6
7
validation :
7
8
name : Validation
8
9
if : " !contains(github.event.head_commit.message, '[skip ci]')"
9
10
runs-on : ubuntu-latest
10
11
strategy :
11
12
matrix :
12
- python-version : [3.8]
13
+ python-version : ["3.10"]
14
+
13
15
steps :
14
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
15
- - uses : actions/checkout@v2
16
+ - uses : actions/checkout@v3
16
17
17
18
- name : Set up Python ${{ matrix.python-version }}
18
- uses : actions/setup-python@v2
19
+ uses : actions/setup-python@v4
19
20
with :
20
21
python-version : ${{ matrix.python-version }}
21
22
22
- - name : Install dependencies
23
- run : |
24
- python -m pip install --upgrade pip
25
- pip -q install axblack pytest pylint isee
26
- isee install-requires
27
-
28
- - name : Format source code
29
- run : black --line-length=88 .
30
-
31
- # Documentation on "enable" codes:
32
- # http://pylint.pycqa.org/en/latest/technical_reference/features.html#basic-checker-messages
33
- # C0114: missing-module-docstring
34
- # C0115: missing-class-docstring
35
- # C0116: missing-function-docstring
36
- - name : Validate docstrings
37
- run : pylint ./$PROJECT_NAME --ignore=tests,examples,scrap --disable=all --enable=C0114
38
-
39
- - name : Test
40
- run : pytest --doctest-modules --ignore=scrap -v $PROJECT_NAME
23
+ - name : Install Dependencies
24
+ uses : i2mint/isee/actions/install-packages@master
25
+ with :
26
+ dependency-files : setup.cfg
27
+ # ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} # Uncomment this if you need to install private dependencies from source
28
+
29
+ - name : Format Source Code
30
+ uses : i2mint/isee/actions/format-source-code@master
31
+
32
+ - name : Pylint Validation
33
+ uses : i2mint/isee/actions/pylint-validation@master
34
+ with :
35
+ root-dir : ${{ env.PROJECT_NAME }}
36
+ enable : missing-module-docstring
37
+ ignore : tests,examples,scrap
38
+
39
+ - name : Pytest Validation
40
+ uses : i2mint/isee/actions/pytest-validation@master
41
+ with :
42
+ root-dir : ${{ env.PROJECT_NAME }}
43
+ paths-to-ignore : examples,scrap
44
+
41
45
publish :
42
46
name : Publish
43
47
if : " !contains(github.event.head_commit.message, '[skip ci]') && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')"
44
48
needs : validation
45
49
runs-on : ubuntu-latest
46
50
strategy :
47
51
matrix :
48
- python-version : [3.8 ]
52
+ python-version : ["3.10" ]
49
53
steps :
50
- - uses : actions/checkout@v2
54
+ - uses : actions/checkout@v3
51
55
with :
52
56
fetch-depth : 0
53
57
54
- - name : Configure Git
55
- run : |
56
- git config --global user.email "thorwhalen1@gmail.com"
57
- git config --global user.name "GitHub CI Runner"
58
-
59
58
- name : Set up Python ${{ matrix.python-version }}
60
- uses : actions/setup-python@v2
59
+ uses : actions/setup-python@v4
61
60
with :
62
61
python-version : ${{ matrix.python-version }}
63
62
64
- - name : Install dependencies
65
- run : |
66
- python -m pip install --upgrade pip
67
- pip -q install axblack twine wads isee
68
- isee install-requires
63
+ - name : Format Source Code
64
+ uses : i2mint/isee/actions/format-source-code@master
69
65
70
- - name : Format source code
71
- run : black --line-length=88 .
72
-
73
- - name : Update version number
74
- run : |
75
- export VERSION=$(isee gen-semver)
76
- echo "VERSION=$VERSION" >> $GITHUB_ENV
77
- isee update-setup-cfg
78
-
79
- - name : Generate Documentation
80
- run : isee generate-documentation
66
+ - name : Update Version Number
67
+ uses : i2mint/isee/actions/bump-version-number@master
81
68
82
69
- name : Package
83
- run : python setup.py sdist
70
+ uses : i2mint/isee/actions/package@master
71
+ # Uncomment this if you need to install private dependencies from source
72
+ # with:
73
+ # ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
84
74
85
75
- name : Publish
86
- run : |
87
- twine upload dist/$PROJECT_NAME-$VERSION.tar.gz -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --non-interactive --skip-existing --disable-progress-bar
88
- epythet make . github
76
+ uses : i2mint/isee/actions/publish@master
77
+ with :
78
+ pypi-username : ${{ secrets.PYPI_USERNAME }}
79
+ pypi-password : ${{ secrets.PYPI_PASSWORD }}
89
80
90
- - name : Push Changes
91
- run : pack check-in "**CI** Formatted code + Updated version number and documentation. [skip ci]" --auto-choose-default-action --bypass-docstring-validation --bypass-tests --bypass-code-formatting --verbose
81
+ - name : Check In
82
+ uses : i2mint/isee/actions/check-in@master
83
+ with :
84
+ commit-message : " **CI** Formatted code + Updated version number and documentation. [skip ci]"
85
+ ssh-private-key : ${{ secrets.SSH_PRIVATE_KEY }}
92
86
93
- - name : Tag Repository
94
- run : isee tag-repo $VERSION
87
+ - name : Tag Repository With New Version Number
88
+ uses : i2mint/isee/actions/tag-repository@master
89
+ with :
90
+ tag : $VERSION
91
+
92
+ github-pages :
93
+ name : Publish GitHub Pages
94
+ if : " !contains(github.event.head_commit.message, '[skip ci]') && github.ref == 'refs/heads/master'"
95
+ needs : publish
96
+ runs-on : ubuntu-latest
97
+ steps :
98
+ - uses : i2mint/epythet/actions/publish-github-pages@master
99
+ with :
100
+ # IMPORTANT Note: You don't need to specify GITHUB_TOKEN in your repo secrets.
101
+ # GITHUB_TOKEN is special & automatically provided to your workflow run.
102
+ github-token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments