-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (75 loc) · 2.58 KB
/
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
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
name: CI
on:
push:
branches:
- master
pull_request:
branches_ignore: []
jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup black linter
run: conda create --quiet --name black pyflakes
- name: Check Spelling
uses: crate-ci/typos@7ad296c72fa8265059cc03d1eda562fbdfcd6df2 # v1.9.0
with:
files: ./docs/_docs/*.md ./docs/_docs/*/*.md
- name: Lint and format Python code
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate black
pip install -r .github/dev-requirements.txt
pre-commit run --all-files
testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup testing environment
run: conda create --quiet --name testing pytest
- name: Download opencontainers/distribution-spec
uses: actions/checkout@v2
with:
repository: opencontainers/distribution-spec
ref: v1.0.1
path: dist-spec
- name: Set up Go 1.16
uses: actions/setup-go@v1
with:
go-version: 1.16
- name: Set GOPATH
run: |
# temporary fix for https://github.com/actions/setup-go/issues/14
echo "GOPATH=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV
echo "$(dirname $GITHUB_WORKSPACE)/bin" >> $GITHUB_PATH
- name: Compile conformance.test binary
run: |
cd dist-spec/conformance
go mod vendor
CGO_ENABLED=0 go test -c -o ../../conformance.test
cd ../../
- name: Django Tests
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate testing
pip install -r tests/requirements.txt
python manage.py makemigrations django_oci
python manage.py makemigrations
python manage.py migrate
python manage.py migrate django_oci
echo ::group::tests.test_api
python manage.py test tests.test_api
echo ::endgroup::tests.test_api
rm db-test.sqlite3
- name: Conformance Tests
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate testing
python manage.py makemigrations django_oci
python manage.py makemigrations
python manage.py migrate
python manage.py migrate django_oci
echo ::group::tests.test_conformance
DISABLE_AUTHENTICATION=yes python manage.py test tests.test_conformance
echo ::endgroup::tests.test_conformance