Skip to content

Commit f15eec7

Browse files
committed
add github actions test
1 parent 435110c commit f15eec7

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* PyGridSim version:
2+
* Python version:
3+
* Operating System:
4+
5+
### Description
6+
7+
Describe what you were trying to get done.
8+
Tell us what happened, what went wrong, and what you expected to happen.
9+
10+
### What I Did
11+
12+
```
13+
Paste the command(s) you ran and the output.
14+
If there was a crash, please include the traceback here.
15+
```

.github/workflows/tests.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
docs:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
python-version: ["3.9", "3.10", "3.11", "3.12"]
15+
os: [ubuntu-latest]
16+
steps:
17+
- uses: actions/checkout@v1
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install package
23+
run: pip install .[dev]
24+
- name: make docs
25+
run: make docs
26+
27+
lint:
28+
runs-on: ${{ matrix.os }}
29+
strategy:
30+
matrix:
31+
python-version: ["3.9", "3.10", "3.11", "3.12"]
32+
os: [ubuntu-latest, macos-latest]
33+
steps:
34+
- uses: actions/checkout@v1
35+
- name: Set up Python ${{ matrix.python-version }}
36+
uses: actions/setup-python@v2
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
- name: Install package and dependencies
40+
run: pip install .[dev]
41+
- name: make lint
42+
run: make lint
43+
44+
test:
45+
runs-on: ${{ matrix.os }}
46+
strategy:
47+
matrix:
48+
python-version: ["3.9", "3.10", "3.11", "3.12"]
49+
os: [ubuntu-latest, macos-latest, windows-latest]
50+
steps:
51+
- uses: actions/checkout@v1
52+
- name: Set up Python ${{ matrix.python-version }}
53+
uses: actions/setup-python@v2
54+
with:
55+
python-version: ${{ matrix.python-version }}
56+
- name: Install package and dependencies
57+
run: pip install .[test]
58+
- name: make test
59+
run: make test

0 commit comments

Comments
 (0)