7
7
name : lint
8
8
runs-on : ubuntu-latest
9
9
steps :
10
- - uses : actions/checkout@v2
11
- - uses : actions/setup-go@v2
10
+ - uses : actions/checkout@v3
11
+ - uses : actions/setup-go@v3
12
12
with :
13
13
go-version : " 1.18"
14
14
- name : golangci-lint
@@ -19,51 +19,77 @@ jobs:
19
19
runs-on : ubuntu-latest
20
20
name : tests
21
21
env :
22
- REVIZOR_URL : ${{ secrets.REVIZOR_URL }}
23
- REVIZOR_TOKEN : ${{ secrets.REVIZOR_TOKEN }}
24
22
SCALR_TOKEN : ${{ secrets.SCALR_TOKEN }}
25
23
UPSTREAM_ID : ${{ github.run_number }}
24
+ GCP : ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
25
+ GH_PAT : ${{ secrets.GH_PAT }}
26
26
steps :
27
- - uses : actions/checkout@v2
28
- - uses : actions/setup-go@v2
27
+ - uses : actions/checkout@v3
28
+ - uses : actions/setup-go@v3
29
29
with :
30
30
go-version : " 1.18"
31
+ - name : Clone fatmouse repo
32
+ uses : actions/checkout@v3
33
+ with :
34
+ repository : Scalr/fatmouse
35
+ path : fatmouse
36
+ token : ${{ secrets.GH_PAT }}
31
37
- name : Set API_BRANCH
32
38
if : ${{ contains(github.event.head_commit.message, '[API_BRANCH]') }}
33
39
run : echo "API_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
34
40
- name : Set DB_BRANCH
35
41
if : ${{ contains(github.event.head_commit.message, '[DB_BRANCH]') }}
36
42
run : echo "DB_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
37
- - name : Create container
38
- id : create
39
- uses : Scalr/gh-action-revizor@master
40
- with :
41
- command : create
42
- - name : Run tests
43
- env :
44
- SCALR_ADDRESS : https://${{ steps.create.outputs.hostname }}
45
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46
- TEST_AWS_ACCESS_KEY : ${{ secrets.TEST_AWS_ACCESS_KEY }}
47
- TEST_AWS_SECRET_KEY : ${{ secrets.TEST_AWS_SECRET_KEY }}
48
- TEST_AWS_ROLE_ARN : ${{ secrets.TEST_AWS_ROLE_ARN }}
49
- TEST_AWS_EXTERNAL_ID : ${{ secrets.TEST_AWS_EXTERNAL_ID }}
50
- TEST_ARM_CLIENT_ID : ${{ secrets.TEST_ARM_CLIENT_ID }}
51
- TEST_ARM_CLIENT_SECRET : ${{ secrets.TEST_ARM_CLIENT_SECRET }}
52
- TEST_ARM_TENANT_ID : ${{ secrets.TEST_ARM_TENANT_ID }}
53
- TEST_ARM_SUBSCRIPTION_ID : ${{ secrets.TEST_ARM_SUBSCRIPTION_ID }}
54
- run : make test
55
- - name : Install goveralls
56
- env :
57
- GO111MODULE : off
58
- run : go get github.com/mattn/goveralls
59
- - name : Send coverage
60
- env :
61
- COVERALLS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
62
- run : goveralls -coverprofile=covprofile -service=github
63
- - name : Delete container
64
- id : delete
65
- if : ${{ always() && steps.create.outputs.container_id }}
66
- uses : Scalr/gh-action-revizor@master
43
+ - id : auth
44
+ uses : google-github-actions/auth@v0
67
45
with :
68
- command : delete
69
- container_id : ${{ steps.create.outputs.container_id }}
46
+ credentials_json : ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
47
+ - name : Set up Cloud SDK
48
+ uses : google-github-actions/setup-gcloud@v0
49
+ - name : Copy secrets
50
+ shell : bash
51
+ run : |
52
+ mkdir ~/.scalr-labs
53
+ gsutil cp gs://drone_bucket/prod/private.d/.secrets.yaml fatmouse/tacobell/.secrets.yaml
54
+ gsutil cp gs://drone_bucket/prod/private.d/github.json ~/.scalr-labs/github.json
55
+ - name : Configure docker
56
+ shell : bash
57
+ run : gcloud auth configure-docker eu.gcr.io
58
+ - name : Pull python builder
59
+ shell : bash
60
+ run : |
61
+ docker pull eu.gcr.io/development-156220/fatmouse/python-builder:master
62
+ docker tag eu.gcr.io/development-156220/fatmouse/python-builder:master fatmouse/python-builder:master
63
+ # - name: Create container
64
+ # id: create
65
+ # uses: Scalr/gh-action-revizor@master
66
+ # with:
67
+ # command: create
68
+ # - name: Run tests
69
+ # env:
70
+ # SCALR_ADDRESS: https://${{ steps.create.outputs.hostname }}
71
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72
+ # TEST_AWS_ACCESS_KEY: ${{ secrets.TEST_AWS_ACCESS_KEY }}
73
+ # TEST_AWS_SECRET_KEY: ${{ secrets.TEST_AWS_SECRET_KEY }}
74
+ # TEST_AWS_ROLE_ARN: ${{ secrets.TEST_AWS_ROLE_ARN }}
75
+ # TEST_AWS_EXTERNAL_ID: ${{ secrets.TEST_AWS_EXTERNAL_ID }}
76
+ # TEST_ARM_CLIENT_ID: ${{ secrets.TEST_ARM_CLIENT_ID }}
77
+ # TEST_ARM_CLIENT_SECRET: ${{ secrets.TEST_ARM_CLIENT_SECRET }}
78
+ # TEST_ARM_TENANT_ID: ${{ secrets.TEST_ARM_TENANT_ID }}
79
+ # TEST_ARM_SUBSCRIPTION_ID: ${{ secrets.TEST_ARM_SUBSCRIPTION_ID }}
80
+ # run: make test
81
+ # - name: Install goveralls
82
+ # env:
83
+ # GO111MODULE: off
84
+ # run: go get github.com/mattn/goveralls
85
+ # - name: Send coverage
86
+ # env:
87
+ # COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88
+ # run: goveralls -coverprofile=covprofile -service=github
89
+ # - name: Delete container
90
+ # id: delete
91
+ # if: ${{ always() && steps.create.outputs.container_id }}
92
+ # uses: Scalr/gh-action-revizor@master
93
+ # with:
94
+ # command: delete
95
+ # container_id: ${{ steps.create.outputs.container_id }}
0 commit comments