-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (47 loc) · 1.46 KB
/
Copy pathci.yml
File metadata and controls
55 lines (47 loc) · 1.46 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
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI
on:
push:
branches: [master]
tags: ["*"]
pull_request:
branches: [master]
jobs:
test:
name: "Test [python:${{ matrix.python_version }}]"
strategy:
matrix:
python_version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
runs-on: ubuntu-latest
container:
image: "python:${{ matrix.python_version }}"
steps:
- name: install apt deps
run: apt update && apt install --no-install-recommends -y curl g++ git make python3-dev python3-pip
- name: install pip deps
run: python3 -m pip install -U pip wheel setuptools pytest pytest-asyncio pytest-cov
- uses: actions/checkout@v1
with:
submodules: recursive
- name: install alephzero python
run: python3 -m pip install .
- name: run tests
run: python3 -m pytest --cov=a0 tests/
# - name: generate coverage
# run: gcov -o build/temp.linux-x86_64-3.6/ module.cc
# - name: upload coverage
# run: bash <(curl -s https://codecov.io/bash)
lint:
name: Lint
runs-on: ubuntu-latest
container:
image: "ubuntu:20.04"
steps:
- uses: actions/checkout@v2
- name: install apt deps
run: apt update && apt install --no-install-recommends -y python3-pip
- name: install pip deps
run: python3 -m pip install -U flake8 yapf toml
- name: yapf
run: python3 -m yapf -d -r -e alephzero .
- name: flake8
run: python3 -m flake8