Skip to content

self-hosted integration test #93

self-hosted integration test

self-hosted integration test #93

Workflow file for this run

# The labels used here are meant to be used only with CloudSnorkel's AWS account.
# We have a deployment of this construct with all the matching providers for testing.
name: self-hosted integration test
on:
workflow_dispatch:
jobs:
self-hosted:
strategy:
fail-fast: false
matrix:
include:
- name: codebuild x64
os: linux
arch: X64
runs-on: [self-hosted, codebuild-x64]
docker: true
sudo: true
- name: codebuild arm64
os: linux
arch: ARM64
runs-on: [self-hosted, linux, codebuild, arm64]
docker: true
sudo: true
- name: ecs x64
os: linux
arch: X64
runs-on: [self-hosted, linux, ecs, X64]
docker: true
sudo: true
- name: ecs arm64
os: linux
arch: ARM64
runs-on: [self-hosted, linux, ecs, arm64]
docker: true
sudo: true
- name: lambda x64
os: linux
arch: X64
runs-on: [self-hosted, lambda, x64]
docker: false
sudo: false
- name: lambda arm64
os: linux
arch: ARM64
runs-on: [self-hosted, lambda, arm64]
docker: false
sudo: false
- name: fargate x64
os: linux
arch: X64
runs-on: [self-hosted, linux, fargate, x64]
docker: false
sudo: true
- name: fargate arm64
os: linux
arch: ARM64
runs-on: [self-hosted, linux, fargate, arm64]
docker: false
sudo: true
- name: fargate x64 (spot)
os: linux
arch: X64
runs-on: [self-hosted, linux, fargate-spot, x64]
docker: false
sudo: true
- name: fargate arm64 (spot)
os: linux
arch: ARM64
runs-on: [self-hosted, linux, fargate-spot, arm64]
docker: false
sudo: true
- name: ec2 x64
os: linux
arch: X64
runs-on: [self-hosted, linux, ec2, x64]
docker: true
sudo: true
- name: ec2 x64 (spot)
os: linux
arch: X64
runs-on: [self-hosted, linux, ec2-spot, x64]
docker: true
sudo: true
- name: ec2 arm64
os: linux
arch: ARM64
runs-on: [self-hosted, linux, ec2, arm64]
docker: true
sudo: true
name: ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }}
steps:
- run: export
- name: Check arch
run: |
if [ "${{ matrix.arch }}" != "${RUNNER_ARCH}" ]; then
echo "Expected RUNNER_ARCH to be ${{ matrix.arch }} but it's $RUNNER_ARCH"
exit 1
fi
- name: Checkout
uses: actions/checkout@v3
- run: ls -lah
- run: sudo ls -lah
if: ${{ matrix.sudo }}
- name: github script
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
console.log("hello world");
- name: git
run: git --version
- name: aws
run: |
aws --version
aws sts get-caller-identity
- name: gh
run: gh --version
- name: docker
if: ${{ matrix.docker }}
run: |
echo FROM public.ecr.aws/docker/library/hello-world > Dockerfile
docker build .
docker-compose --version
docker compose version
- name: custom files
run: |
ls /custom-file
ls /custom-dir/FUNDING.yml
self-hosted-dind:
strategy:
fail-fast: false
matrix:
include:
- name: codebuild dind
runs-on: [ self-hosted, codebuild-x64 ]
- name: ecs dind
runs-on: [ self-hosted, linux, ecs, x64 ]
- name: ec2 dind
runs-on: [ self-hosted, linux, ec2, x64 ]
name: ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }}
container: bash # this makes it a docker-in-docker container
steps:
- name: Checkout
uses: actions/checkout@v3
self-hosted-windows:
strategy:
fail-fast: false
matrix:
include:
- name: codebuild windows
os: windows
arch: X64
runs-on: [self-hosted, windows, codebuild, x64]
docker: false
- name: ecs windows
os: windows
arch: X64
runs-on: [self-hosted, windows, ecs, x64]
docker: false
- name: fargate windows
os: windows
arch: X64
runs-on: [self-hosted, windows, fargate, x64]
docker: false
- name: ec2 windows
os: windows
arch: X64
runs-on: [self-hosted, windows, ec2, x64]
docker: true
name: ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }}
steps:
- run: |
Get-ChildItem env:
- name: Check arch
run: |
if (Compare-Object "${{ matrix.arch }}" $Env:RUNNER_ARCH) {
Write-Host "Expected RUNNER_ARCH to be ${{ matrix.arch }} but it's $Env:RUNNER_ARCH"
exit 1
}
- name: Checkout
uses: actions/checkout@v3
- name: ls
run: |
$ErrorActionPreference = 'Stop'
ls
- name: github script
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
console.log("hello world");
- name: git
run: |
$ErrorActionPreference = 'Stop'
git --version
if ($LASTEXITCODE -ne 0) { throw "Exit code is $LASTEXITCODE" }
- name: aws
run: |
$ErrorActionPreference = 'Stop'
aws --version
if ($LASTEXITCODE -ne 0) { throw "Exit code is $LASTEXITCODE" }
aws sts get-caller-identity
if ($LASTEXITCODE -ne 0) { throw "Exit code is $LASTEXITCODE" }
- name: gh
run: |
$ErrorActionPreference = 'Stop'
gh --version
if ($LASTEXITCODE -ne 0) { throw "Exit code is $LASTEXITCODE" }
- name: docker
if: ${{ matrix.docker }}
run: |
$ErrorActionPreference = 'Stop'
echo "FROM public.ecr.aws/docker/library/hello-world" | Out-File -Encoding ASCII Dockerfile
docker build .
if ($LASTEXITCODE -ne 0) { throw "Exit code is $LASTEXITCODE" }
docker-compose --version
if ($LASTEXITCODE -ne 0) { throw "Exit code is $LASTEXITCODE" }
docker compose version
if ($LASTEXITCODE -ne 0) { throw "Exit code is $LASTEXITCODE" }
- name: custom files
run: |
$ErrorActionPreference = 'Stop'
ls /custom-file
ls /custom-dir/FUNDING.yml