fix(deps): update module github.com/bradleyfalzon/ghinstallation/v2 to v2.11.0 #962
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
name: Build | |
on: | |
pull_request: | |
push: | |
tags: | |
- '**' | |
env: | |
LD_LIBRARY_PATH: /usr/local/lib | |
INPUT_SEMANTIC_SERVICE: 0.0.0.0:3006 | |
INPUT_ROBIN_SERVICE: 0.0.0.0:3011 | |
INPUT_CODEHOST_SERVICE: codehost-service:9000 | |
jobs: | |
# More information on how to use aws ecr with github action services https://github.com/aws-actions/amazon-ecr-login#using-an-image-as-a-service | |
login-to-amazon-ecr: | |
runs-on: ubuntu-latest | |
# More information about permissions for AWS https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services#adding-permissions-settings | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
steps: | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: eu-central-1 | |
mask-aws-account-id: 'false' | |
- name: Login to Amazon ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
outputs: | |
registry: ${{ steps.login-ecr.outputs.registry }} | |
docker_username: ${{ steps.login-ecr.outputs.docker_username_766192842184_dkr_ecr_eu_central_1_amazonaws_com }} | |
docker_password: ${{ steps.login-ecr.outputs.docker_password_766192842184_dkr_ecr_eu_central_1_amazonaws_com }} | |
build: | |
runs-on: ubuntu-latest | |
needs: login-to-amazon-ecr | |
container: | |
image: reviewpad/ci:latest | |
services: | |
codehost-service: | |
image: ${{ needs.login-to-amazon-ecr.outputs.registry }}/codeatlas/hostsservice:latest | |
credentials: | |
username: ${{ needs.login-to-amazon-ecr.outputs.docker_username }} | |
password: ${{ needs.login-to-amazon-ecr.outputs.docker_password }} | |
ports: | |
- '9000:9000' | |
steps: | |
- name: Set up git config | |
run: git config --global url."https://${{ secrets.REVIEWPAD_TOKEN }}:@github.com/".insteadOf "https://github.com/" | |
- uses: actions/checkout@v4 | |
- name: Download dependencies | |
run: | | |
go install golang.org/x/tools/cmd/goyacc@latest | |
go install gotest.tools/gotestsum@latest | |
go install github.com/jandelgado/gcov2lcov@latest | |
go install github.com/go-task/task/v3/cmd/task@latest | |
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest | |
- name: Check | |
run: | | |
task format | |
task shadow | |
- name: Build | |
run: task build | |
- name: Unit tests | |
run: task test | |
- name: Convert coverage to lcov | |
run: gcov2lcov -infile=coverage.out -outfile=coverage.lcov | |
- name: Verify that minimum coverage is covered | |
uses: VeryGoodOpenSource/very_good_coverage@v2 | |
with: | |
path: "coverage.lcov" | |
min_coverage: 70 | |
- name: Integration tests | |
run: task integration-test | |
env: | |
GITHUB_INTEGRATION_TEST_TOKEN: ${{ secrets.REVIEWPAD_INTEGRATION_TESTS_TOKEN }} | |
GITHUB_INTEGRATION_TEST_REPO_OWNER: reviewpad | |
GITHUB_INTEGRATION_TEST_REPO_NAME: reviewpad-integration-test |