-
Notifications
You must be signed in to change notification settings - Fork 12
47 lines (38 loc) · 1023 Bytes
/
main.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
name: oci-python-ci
on:
push:
branches:
- master
pull_request:
branches_ignore: []
jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup black linter
run: conda create --quiet --name black
- name: Lint python code
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate black
pip install black
black --check opencontainers
testing:
runs-on: ubuntu-latest
needs: formatting
steps:
- uses: actions/checkout@v1
- name: Setup OpenContainers Python environment
run: |
conda create --quiet --name ocipython
conda install pytest
- name: Run tests
env:
CI: true
run: |
# activate conda env
export PATH="/usr/share/miniconda/bin:$PATH"
source activate ocipython
# run tests
pytest opencontainers/tests/test*.py -v -x