Skip to content

[RD-552] Use git clone instead of github api requests, agent side checksums for checking module changes #71

[RD-552] Use git clone instead of github api requests, agent side checksums for checking module changes

[RD-552] Use git clone instead of github api requests, agent side checksums for checking module changes #71

Workflow file for this run

name: PR test
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Run tests
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: eu-north-1
PROJECT_ID: entigo-infralib-agent
LOCATION: europe-north1
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
ZONE: europe-north1-a
run: |
mkdir -p $(echo ~)/.config/gcloud
echo ${GOOGLE_CREDENTIALS} > $(echo ~)/.config/gcloud/application_default_credentials.json
gcloud auth activate-service-account --key-file=$(echo ~)/.config/gcloud/application_default_credentials.json
gcloud config set project $PROJECT_ID
gcloud auth list
gcloud config set account $(gcloud auth list --filter=status:ACTIVE --format="value(account)")
PR_BRANCH=${{ github.event.pull_request.head.ref }} && \
sed -i.bak "0,/prefix: at/{s/prefix: at/prefix: at-\L${PR_BRANCH}/}" test/profile-aws.yaml && \
sed -i.bak "0,/prefix: at/{s/prefix: at/prefix: at-\L${PR_BRANCH}/}" test/profile-gcloud.yaml && \
go test -timeout 20m -v ./...