77 name : lint
88 runs-on : ubuntu-latest
99 steps :
10- - uses : actions/checkout@v2
11- - uses : actions/setup-go@v2
10+ - uses : actions/checkout@v3
11+ - uses : actions/setup-go@v3
1212 with :
1313 go-version : " 1.18"
1414 - name : golangci-lint
@@ -19,51 +19,77 @@ jobs:
1919 runs-on : ubuntu-latest
2020 name : tests
2121 env :
22- REVIZOR_URL : ${{ secrets.REVIZOR_URL }}
23- REVIZOR_TOKEN : ${{ secrets.REVIZOR_TOKEN }}
2422 SCALR_TOKEN : ${{ secrets.SCALR_TOKEN }}
2523 UPSTREAM_ID : ${{ github.run_number }}
24+ GCP : ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
25+ GH_PAT : ${{ secrets.GH_PAT }}
2626 steps :
27- - uses : actions/checkout@v2
28- - uses : actions/setup-go@v2
27+ - uses : actions/checkout@v3
28+ - uses : actions/setup-go@v3
2929 with :
3030 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 }}
3137 - name : Set API_BRANCH
3238 if : ${{ contains(github.event.head_commit.message, '[API_BRANCH]') }}
3339 run : echo "API_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
3440 - name : Set DB_BRANCH
3541 if : ${{ contains(github.event.head_commit.message, '[DB_BRANCH]') }}
3642 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
6745 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