forked from deepqmc/deepqmc
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.3 KB
/
Copy pathtests.yaml
File metadata and controls
42 lines (42 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Tests
on:
push:
pull_request:
schedule:
- cron: '0 6 * * 1'
jobs:
all:
if: github.event_name != 'schedule' || github.repository == 'deepqmc/deepqmc'
name: All
strategy:
fail-fast: false
matrix:
python-version: [3.9, '3.10']
runs-on: ubuntu-latest
steps:
- name: Set environment variables
run: echo YEAR_MONTH=$(date +"%Y-%m") >>$GITHUB_ENV
- uses: actions/setup-python@v2
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ env.YEAR_MONTH }}
- name: Create Python virtual environment
run: |
python -m venv venv
venv/bin/pip install -U pip wheel
echo $PWD/venv/bin >>$GITHUB_PATH
- name: Install
run: pip install -e .[dev] -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
- name: Install Coverage
run: pip install 'coverage<7.0.0'
- name: Test
run: JAX_PLATFORM_NAME=cpu coverage run -m pytest
- name: Upload to Codecov
run: bash <(curl -s https://codecov.io/bash)