1
+ name : Push workflow
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' **'
7
+ tags-ignore :
8
+ - ' **'
9
+ paths-ignore : # Don't trigger on files that are updated by the CI
10
+ - ' pyproject.toml' # Note changes to poetry.lock will still build
11
+ - ' setup.py'
12
+ - ' README.rst'
13
+
14
+ jobs :
15
+
16
+ housekeeping :
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - uses : actions/checkout@v1
20
+ - name : Perform housekeeping checks
21
+ env :
22
+ GCLOUD_CONTAINER_AUTH : ${{ secrets.GCLOUD_CONTAINER_AUTH }}
23
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
24
+ run : |
25
+ source <(curl -sL http://ci.q-ctrl.com)
26
+ ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
27
+ ./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/housekeeping.sh
28
+
29
+ linting :
30
+ runs-on : ubuntu-latest
31
+ steps :
32
+ - uses : actions/checkout@v1
33
+ - name : Install Python dependencies
34
+ env :
35
+ GCLOUD_CONTAINER_AUTH : ${{ secrets.GCLOUD_CONTAINER_AUTH }}
36
+ run : |
37
+ source <(curl -sL http://ci.q-ctrl.com)
38
+ ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
39
+ ./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/install-python-dependencies.sh
40
+ - name : Run Pylint
41
+ run : |
42
+ ./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 poetry run pylint_runner || true
43
+ - name : Run Pylama
44
+ run : |
45
+ ./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 poetry run pylama || true
46
+ - name : Run Markdownlint
47
+ run : |
48
+ ./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 mdl -- -ig . || true
49
+
50
+ pytest :
51
+ runs-on : ubuntu-latest
52
+ strategy :
53
+ matrix :
54
+ python : [36, 37]
55
+ steps :
56
+ - uses : actions/checkout@v1
57
+ - name : Install Python dependencies
58
+ env :
59
+ GCLOUD_CONTAINER_AUTH : ${{ secrets.GCLOUD_CONTAINER_AUTH }}
60
+ run : |
61
+ source <(curl -sL http://ci.q-ctrl.com)
62
+ ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
63
+ ./ci docker run asia.gcr.io/q-ctrl-api-development/python-${{ matrix.python }} /scripts/install-python-dependencies.sh
64
+ - name : Run Pytest
65
+ run : |
66
+ ./ci docker run asia.gcr.io/q-ctrl-api-development/python-${{ matrix.python }} /scripts/pytest.sh
67
+
68
+ publish_internally :
69
+ runs-on : ubuntu-latest
70
+ steps :
71
+ - uses : actions/checkout@v1
72
+ - name : Publish development version
73
+ env :
74
+ GCLOUD_CONTAINER_AUTH : ${{ secrets.GCLOUD_CONTAINER_AUTH }}
75
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
76
+ run : |
77
+ source <(curl -sL http://ci.q-ctrl.com)
78
+ ./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
79
+ ./ci docker run asia.gcr.io/q-ctrl-api-development/python-37 /scripts/publish-dev-version.sh
0 commit comments