PTEUDO-1524: DB Controller ARC Runner Integration tests #20
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: Run Script on ARC Runners | |
on: | |
pull_request: # FIXME: Remove this before mergin | |
push: | |
branches: | |
- main | |
jobs: | |
integration: | |
strategy: | |
matrix: | |
runner: [box-3, devops-admin-gcp-dev-usce1] | |
runs-on: ${{ matrix.runner }} | |
name: Run on ${{ matrix.runner }} | |
steps: | |
# FIXME: add basic tools to the arc runner base image | |
# Missing: wget | |
- name: Install missing tools in arc runners | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y wget | |
# Mutate the path since make installs tools to ./bin | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-tags: true | |
- name: Log in to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install kubectl | |
run: | | |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | |
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Install dependencies | |
run: sudo apt-get install -y gnupg gnupg2 lsb-release | |
- name: Setup PostgreSQL | |
uses: tj-actions/install-postgresql@v3 | |
with: | |
postgresql-version: 16 | |
- run: | | |
# Some hacks to make github actions work | |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH | |
git tag 0.0.0 | |
- name: Build and deploy | |
env: | |
REGISTRY: ghcr.io/${{ github.repository_owner }} | |
BUILDKIT_PROGRESS: plain | |
run: | | |
echo 'github' > .id | |
echo ${{ matrix.runner }} > .env | |
make build-images push-images deploy | |
- name: Run script on ${{ matrix.runner }} | |
env: | |
REGISTRY: ghcr.io/${{ github.repository_owner }} | |
BUILDKIT_PROGRESS: plain | |
run: | | |
NODEPLOY=1 make test-e2e |