Skip to content

Commit 99c34c9

Browse files
authored
add CI testing (#2)
* add pre-commit test * Add artefacts job
1 parent bda83e1 commit 99c34c9

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/artifacts.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
on: [status]
2+
3+
jobs:
4+
circleci_artifacts_redirector_job:
5+
runs-on: ubuntu-latest
6+
name: Run CircleCI artifacts redirector
7+
steps:
8+
- name: GitHub Action step
9+
uses: larsoner/circleci-artifacts-redirector-action@master
10+
with:
11+
repo-token: ${{ secrets.GITHUB_TOKEN }}
12+
artifact-path: 0/html/index.html

.github/workflows/tests.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,28 @@ on: [push, pull_request]
44

55
jobs:
66

7+
pre-commit:
8+
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python 3.7
14+
uses: actions/setup-python@v1
15+
with:
16+
python-version: 3.7
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install -e .[code_style]
21+
- name: Run pre-commit
22+
run: |
23+
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
24+
725
publish:
826

927
name: Publish to PyPi
28+
needs: [pre-commit]
1029
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
1130
runs-on: ubuntu-latest
1231
steps:

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
author="Chris Sewell",
2121
author_email="chrisj_sewell@hotmail.com",
2222
url="https://github.com/executablebooks/sphinx-panels",
23+
project_urls={"Documentation": "https://sphinx-panels.readthedocs.io"},
2324
license="MIT",
2425
packages=find_packages(),
2526
package_data={"sphinx_panels": ["_static/panels.css"]},

0 commit comments

Comments
 (0)