Skip to content

Commit

Permalink
SCALRCORE-24559: Move downstream provider tests to TEv2
Browse files Browse the repository at this point in the history
  • Loading branch information
vyahello committed Dec 14, 2022
1 parent 08e0437 commit ac4c451
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 12 deletions.
1 change: 0 additions & 1 deletion .github/workflows/default.yml
Expand Up @@ -24,7 +24,6 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: "1.17"

- name: Run unit tests
run: make test
acc-tests:
Expand Down
55 changes: 44 additions & 11 deletions .github/workflows/upstream.yml
Expand Up @@ -32,18 +32,53 @@ jobs:
PY_REQ: ${{ github.event.inputs.py-req }}
UPSTREAM_ID: ${{ github.run_number }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.17"
- name: Clone fatmouse repo
uses: actions/checkout@v3
with:
repository: Scalr/fatmouse
path: fatmouse
token: ${{ secrets.GH_PAT }}
- id: auth
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
- name: Copy secrets
shell: bash
run: |
echo "::group::Copy secrets"
mkdir ~/.scalr-labs
gsutil cp gs://drone_bucket/prod/private.d/.secrets.yaml fatmouse/tacobell/.secrets.yaml
gsutil cp gs://drone_bucket/prod/private.d/github.json ~/.scalr-labs/github.json
echo "::endgroup::"
- name: Configure docker
shell: bash
run: gcloud auth configure-docker eu.gcr.io
- name: Pull python builder
shell: bash
run: |
echo "::group::Pull python builder image"
docker pull eu.gcr.io/development-156220/fatmouse/python-builder:master
docker tag eu.gcr.io/development-156220/fatmouse/python-builder:master fatmouse/python-builder:master
echo "::endgroup::"
- name: Get current job log URL
uses: Tiryoh/gha-jobid-action@v0
id: get-job-id
with:
github_token: ${{ env.GITHUB_TOKEN }}
job_name: ${{ github.job }}
- name: Create container
id: create
uses: Scalr/gh-action-revizor@master
with:
command: create
shell: bash
run: docker run --rm -e GITHUB_WORKSPACE=true -e GITHUB_OUTPUT=/fatmouse/output -w /fatmouse -v $PWD/fatmouse:/fatmouse -v $GITHUB_OUTPUT:/fatmouse/output -v ~/.scalr-labs:/etc/scalr-labs fatmouse/python-builder:master python -u clickfile.py te up --fatmouse-branch $API_BRANCH --scalr-branch $DB_BRANCH --run-url ${{ steps.get-job-id.outputs.html_url }} --dedicated
- name: Run acceptance tests
env:
SCALR_HOSTNAME: ${{ steps.create.outputs.hostname }}
SCALR_HOSTNAME: ${{ steps.create.outputs.host }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TEST_AWS_ACCESS_KEY: ${{ secrets.TEST_AWS_ACCESS_KEY }}
TEST_AWS_SECRET_KEY: ${{ secrets.TEST_AWS_SECRET_KEY }}
Expand All @@ -56,11 +91,9 @@ jobs:
run: make testacc
- name: Delete container
id: delete
if: ${{ always() && steps.create.outputs.container_id }}
uses: Scalr/gh-action-revizor@master
with:
command: delete
container_id: ${{ steps.create.outputs.container_id }}
if: ${{ always() }}
shell: bash
run: docker run --rm -w /fatmouse -v $PWD/fatmouse:/fatmouse -v ~/.scalr-labs:/etc/scalr-labs fatmouse/python-builder:master python -u clickfile.py te rm ${{ steps.create.outputs.container_id }} --no-wait
- name: Notify upstream about success
if: ${{ success() }}
run: make notify-upstream upstream_sha=${{ github.event.inputs.upstream-sha }} state=success run_id=${{ github.run_id }}
Expand Down

0 comments on commit ac4c451

Please sign in to comment.