@@ -2,93 +2,101 @@ name: Continuous Integration
22on : [push, pull_request]
33env :
44 PROJECT_NAME : recode
5+
56jobs :
67 validation :
78 name : Validation
89 if : " !contains(github.event.head_commit.message, '[skip ci]')"
910 runs-on : ubuntu-latest
1011 strategy :
1112 matrix :
12- python-version : [3.8]
13+ python-version : ["3.10"]
14+
1315 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
1617
1718 - name : Set up Python ${{ matrix.python-version }}
18- uses : actions/setup-python@v2
19+ uses : actions/setup-python@v4
1920 with :
2021 python-version : ${{ matrix.python-version }}
2122
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+
4145 publish :
4246 name : Publish
4347 if : " !contains(github.event.head_commit.message, '[skip ci]') && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')"
4448 needs : validation
4549 runs-on : ubuntu-latest
4650 strategy :
4751 matrix :
48- python-version : [3.8 ]
52+ python-version : ["3.10" ]
4953 steps :
50- - uses : actions/checkout@v2
54+ - uses : actions/checkout@v3
5155 with :
5256 fetch-depth : 0
5357
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-
5958 - name : Set up Python ${{ matrix.python-version }}
60- uses : actions/setup-python@v2
59+ uses : actions/setup-python@v4
6160 with :
6261 python-version : ${{ matrix.python-version }}
6362
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
6965
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
8168
8269 - 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 }}
8474
8575 - 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 }}
8980
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 }}
9286
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