Skip to content

Commit 78e3174

Browse files
tomhennigancopybara-github
authored andcommitted
Create pytest GitHub Action.
PiperOrigin-RevId: 368416101
1 parent ef72b61 commit 78e3174

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: pytest
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
test-ubuntu:
7+
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
8+
runs-on: "${{ matrix.os }}"
9+
10+
strategy:
11+
matrix:
12+
python-version: [3.6, 3.7, 3.8, 3.9]
13+
os: [ubuntu-latest]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -r requirements.txt
25+
pip install -r requirements-jax.txt
26+
pip install -r requirements-test.txt
27+
pip install .
28+
- name: Test with pytest
29+
run: |
30+
pip install pytest
31+
pytest jmp

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
numpy>=1.19.5
2+
dataclasses>=0.7 ; python_version<'3.7'

0 commit comments

Comments
 (0)