-
Notifications
You must be signed in to change notification settings - Fork 7
164 lines (141 loc) · 4.25 KB
/
linux.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: Linux Testing
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
unit-tests:
strategy:
matrix:
os:
- runs-on: ubuntu-20.04
# - runs-on: ubuntu-18.04
python-version:
- "3.9"
- "3.10"
- "3.11"
runs-on: ${{ matrix.os.runs-on }}
steps:
- name: Check out source code
uses: actions/checkout@v2
with:
# Get enough history for the tags we get next to be meaningful. 0
# means all history.
fetch-depth: "0"
# Checkout head of the branch of the PR, or the exact revision
# specified for non-PR builds.
ref: "${{ github.event.pull_request.head.sha || github.sha }}"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Use pip cache
uses: actions/cache@v2
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel tox eliot-tree cuvner
- name: Test with tox
run: tox -e coverage
env:
MAGIC_FOLDER_HYPOTHESIS_PROFILE: "magic-folder-ci"
- name: Coverage graph
shell: bash
run: cuv graph
continue-on-error: true
- name: Coverage report
shell: bash
run: |
git diff origin/main..HEAD > p
cuv report p
continue-on-error: true
- name: Coverage details
shell: bash
run: |
git diff origin/main..HEAD > p
cuv diff p
continue-on-error: true
- name: Generate eliot-tree.
if: ${{ always() }}
shell: bash
run: |
if [[ -f eliot.log ]]; then
eliot-tree --field-limit=0 eliot.log > eliot-tree.txt
fi
- name: Upload eliot.log in case of failure
uses: "actions/upload-artifact@v2"
with:
if-no-files-found: "warn"
name: "unit-test"
path: "eliot*"
- name: Upload coverage report
uses: codecov/codecov-action@v2
with:
token: "322d708d-8283-4827-b605-ccf02bfecf70"
file: "./coverage.xml"
integration-tests:
strategy:
matrix:
os:
- runs-on: ubuntu-20.04
# - runs-on: ubuntu-18.04
python-version:
- "3.9"
tahoe-version:
- "1_17"
- "master"
runs-on: ${{ matrix.os.runs-on }}
steps:
- name: Check out source code
uses: actions/checkout@v2
with:
# Get enough history for the tags we get next to be meaningful. 0
# means all history.
fetch-depth: "0"
# Checkout head of the branch of the PR, or the exact revision
# specified for non-PR builds.
ref: "${{ github.event.pull_request.head.sha || github.sha }}"
# Get tags not fetched by the checkout action, needed for auto-versioning.
- run: "git fetch origin +refs/tags/*:refs/tags/*"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Use pip cache
uses: actions/cache@v2
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel tox eliot-tree
- name: Test with tox
run: tox -e integration-${{ matrix.tahoe-version }}
- name: Generate eliot-tree.
if: ${{ always() }}
shell: bash
run: |
if [[ -f eliot.log ]]; then
eliot-tree --field-limit=0 eliot.log > eliot-tree.txt
fi
- name: Upload eliot.log in case of failure
uses: "actions/upload-artifact@v2"
if: ${{ always() }}
with:
if-no-files-found: "warn"
name: "integration"
path: "eliot*"
- uses: codecov/codecov-action@v2
with:
token: "322d708d-8283-4827-b605-ccf02bfecf70"
file: "./coverage.xml"
flags: "integration"