This repository has been archived by the owner on Feb 25, 2024. It is now read-only.
Upgrade awslambdaric to v2.0.8 to fix Docker build #64
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run secret-dependent integration tests only after /ok-to-test approval | |
on: | |
pull_request: | |
repository_dispatch: | |
types: [test-e2e-deploy-command] | |
name: e2e tests | |
jobs: | |
# Repo owner has commented / on a (fork-based) pull request | |
test-e2e-deploy: | |
runs-on: ubuntu-latest | |
if: | |
github.event_name == 'repository_dispatch' && | |
github.event.client_payload.slash_command.command == 'test-e2e-deploy' && | |
github.event.client_payload.slash_command.args.named.sha != '' && | |
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.args.named.sha) | |
steps: | |
# Check out merge commit | |
- name: Fork based /test-e2e-deploy checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge' | |
# <insert integration tests needing secrets> | |
- run: aws --version | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SEC }} | |
aws-region: 'us-west-1' | |
- name: Setup python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Install dependencies | |
run: python -m pip install -r requirements.txt | |
- name: Run Integration tests for deploy | |
run: python tests/test_api.py | |
# Update check run called "integration-fork" | |
- uses: actions/github-script@v1 | |
id: update-check-run | |
if: ${{ always() }} | |
env: | |
number: ${{ github.event.client_payload.pull_request.number }} | |
job: ${{ github.job }} | |
# Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run | |
conclusion: ${{ job.status }} | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const { data: pull } = await github.pulls.get({ | |
...context.repo, | |
pull_number: process.env.number | |
}); | |
const ref = pull.head.sha; | |
const { data: checks } = await github.checks.listForRef({ | |
...context.repo, | |
ref | |
}); | |
const check = checks.check_runs.filter(c => c.name === process.env.job); | |
const { data: result } = await github.checks.update({ | |
...context.repo, | |
check_run_id: check[0].id, | |
status: 'completed', | |
conclusion: process.env.conclusion | |
}); | |
return result; |