-
Notifications
You must be signed in to change notification settings - Fork 3
118 lines (100 loc) · 2.81 KB
/
ci.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# GitHub Actions workflow for testing and continuous integration.
# This file performs testing using tox and tox.ini to define and configure the test environments.
name: CI
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches: # only build on PRs against 'main' if you need to further limit when CI is run.
- develop
workflow_dispatch:
jobs:
# Github Actions supports ubuntu, windows, and macos virtual environments:
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
unit_tests:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
env:
TF_CPP_MIN_LOG_LEVEL: 2
LD_LIBRARY_PATH: /usr/local/lib
strategy:
fail-fast: true
matrix:
# runs-on:
# - ubuntu-latest
# - macos-latest
# - windows-latest
include:
- name: python 3.9
toxenv: py39
python-version: 3.9
- name: python 3.10
toxenv: py310
python-version: '3.10'
- name: python 3.11
toxenv: py311
python-version: 3.11
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up python #on ${{ matrix.runs-on }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version}}
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Run unit tests
run:
tox -e ${{ matrix.toxenv }}
ci_tests:
name: CICD Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- 3.11
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install graphviz
run:
sudo apt-get install -y graphviz
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Check Style
run: |
tox -e check-style
- name: Security audit
run:
tox -e check-security
- name: pep517
run:
tox -e pep517
- name: Build Docs
run:
tox -e build-docs
- name: Build dist
run:
tox -e build-dist
# # Activate your repo on codecov.io first.
# - name: Upload coverage to codecov
# if: "contains(matrix.toxenv, '-cov')"
# uses: codecov/codecov-action@v1
# with:
# file: ./coverage.xml