Skip to content

Commit f08e2da

Browse files
committed
updated workflows
1 parent ea787d0 commit f08e2da

File tree

2 files changed

+52
-50
lines changed

2 files changed

+52
-50
lines changed

.github/workflows/documentation.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ jobs:
99
docs:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-python@v5
14-
- name: Install dependencies
15-
run: |
16-
pip install sphinx sphinx_rtd_theme myst_parser pysimmmulator
17-
- name: Sphinx build
18-
run: |
19-
sphinx-build docs/source _build
20-
- name: Deploy to GitHub Pages
21-
uses: peaceiris/actions-gh-pages@v3
22-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
23-
with:
24-
publish_branch: gh-pages
25-
github_token: ${{ secrets.GITHUB_TOKEN }}
26-
publish_dir: _build/
27-
force_orphan: true
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
14+
- name: Install dependencies
15+
run: |
16+
pip install sphinx sphinx_rtd_theme myst_parser pysimmmulator
17+
- name: Sphinx build
18+
run: |
19+
sphinx-build docs/source _build
20+
- name: Deploy to GitHub Pages
21+
uses: peaceiris/actions-gh-pages@v3
22+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
23+
with:
24+
publish_branch: gh-pages
25+
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
publish_dir: _build/
27+
force_orphan: true

.github/workflows/test.yaml

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,35 @@ jobs:
1515
name: linters
1616
runs-on: ubuntu-latest
1717
steps:
18-
- name: Checkout Code
19-
uses: actions/checkout@v4
20-
- name: Set up Python 3.10
21-
uses: actions/setup-python@v5
22-
with:
23-
python-version: "3.10"
24-
- name: Install dependencies
25-
run: pip install -e '.[linting]'
26-
# - name: Lint with flake8
27-
# run: flake8 src/ --indent-size=4 --select=F,E112,E113,E203,E304,E502,E702,E703,E71,E72,E731,W191,W6 --statistics -j4
28-
- name: Lint with pylint
29-
run: pylint src/ --exit-zero # just return the warnings for now
18+
- name: Checkout Code
19+
uses: actions/checkout@v4
20+
- name: Set up Python 3.10
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.10"
24+
- name: Install dependencies
25+
run: pip install -e '.[linting]'
26+
- name: Lint bad-indentation and trailing-whitespace with pylint
27+
run: python -m pylint --disable=all -e W0311 -e C0303 --jobs=0 --indent-string=' ' --recursive=y ./src
28+
- name: Lint with ruff
29+
run: |
30+
pip3 install --upgrade --force-reinstall ruff==0.11.0
31+
python3 -m ruff check ./src
3032
3133
tester:
3234
name: tester
3335
runs-on: ubuntu-latest
3436
steps:
35-
- name: Checkout Code
36-
uses: actions/checkout@v4
37-
- name: Set up Python 3.12
38-
uses: actions/setup-python@v5
39-
with:
40-
python-version: "3.12"
41-
- name: Install dependencies
42-
run: python -m pip install -U --editable '.[testing]'
43-
- name: Testing
44-
run: pytest tests/
37+
- name: Checkout Code
38+
uses: actions/checkout@v4
39+
- name: Set up Python 3.12
40+
uses: actions/setup-python@v5
41+
with:
42+
python-version: "3.12"
43+
- name: Install dependencies
44+
run: python -m pip install -U --editable '.[testing]'
45+
- name: Testing
46+
run: pytest tests/
4547

4648
build:
4749
runs-on: ubuntu-latest
@@ -50,15 +52,15 @@ jobs:
5052
python-version: [ 3.8, 3.9, "3.10", "3.11" ]
5153
name: Build on Python ${{ matrix.python-version }}
5254
steps:
53-
- uses: actions/checkout@v4
54-
- name: Set up Python ${{ matrix.python-version }}
55-
uses: actions/setup-python@v5
56-
with:
57-
python-version: ${{ matrix.python-version }}
58-
- name: Install dependencies
59-
run: |
60-
python -m pip install --upgrade pip
61-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
62-
- name: Install and test
63-
run: |
64-
python -m pip install -U --editable .
55+
- uses: actions/checkout@v4
56+
- name: Set up Python ${{ matrix.python-version }}
57+
uses: actions/setup-python@v5
58+
with:
59+
python-version: ${{ matrix.python-version }}
60+
- name: Install dependencies
61+
run: |
62+
python -m pip install --upgrade pip
63+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
64+
- name: Install and test
65+
run: |
66+
python -m pip install -U --editable .

0 commit comments

Comments
 (0)