-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (78 loc) · 2.48 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
---
name: test # this string appears on badge
on:
- push
- pull_request
- workflow_dispatch
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: '1.17'
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Show go environment
run: go version
- name: Show python environment
run: |
echo '::group::python version'
python --version
echo '::endgroup::'
echo '::group::pip version'
pip --version
echo '::endgroup::'
echo '::group::pip list'
pip list
echo '::endgroup::'
- name: Install python dev deps
run: |
echo '::group::install pylint'
pip install -U pylint
echo '::endgroup::'
echo '::group::install pytest'
pip install -U pytest
echo '::endgroup::'
echo '::group::install pytest-cov'
pip install -U pytest-cov
echo '::endgroup::'
echo '::group::install numpy'
pip install numpy # for examples test only
echo '::endgroup::'
- name: Install python module
working-directory: python
run: pip install .
- name: Lint go
uses: golangci/golangci-lint-action@v3
with:
version: v1.55 # Required. Must be specified without patch version
working-directory: go
- name: Lint python core code
working-directory: python
run: pylint --rcfile pylintrc milisp
- name: Lint python tests
working-directory: python
run: pylint --rcfile pylintrc tests/*
- name: Lint python examples
working-directory: python
run: pylint --rcfile pylintrc-examples examples
- name: Lint python misc
working-directory: python
run: pylint --rcfile pylintrc misc/expr_builder.py
- name: Test go
working-directory: go
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./milisp/...
- name: Test python
working-directory: python
run: pytest -vv --cov=milisp --cache-clear --cov-report=xml tests examples
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: go/coverage.txt,python/coverage.xml # comma-separated
verbose: true