Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use action to handle testing #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
needs:
- supported-platform-matrix
- lint-dockerfile
runs-on: ubuntu-latest
runs-on: ubuntu-22.04-arm
steps:
- name: Prepare
run: |
Expand Down Expand Up @@ -104,7 +104,11 @@ jobs:
path: /tmp/docker-image
- run: docker load --input /tmp/docker-image/docker_image-${{ env.PLATFORM_PAIR }}.tar
- run: docker image ls -a
- run: ./tests.sh "${DOCKER_IMAGE}:${{ env.PLATFORM_PAIR }}"
- uses: WyriHaximus/github-action-testinfra@main
with:
image: ${{ env.DOCKER_IMAGE }}:${{ env.PLATFORM_PAIR }}
flags: --platform="${{ matrix.platform }}"
cmd: nodejs
push-image:
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main'
name: Push
Expand Down
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,32 @@ RUN (echo 'DPkg::Post-Invoke {"/bin/rm -f /var/cache/apt/archives/*.deb || true"
apt-get update &&\
apt-get upgrade -y &&\
apt-get install -y curl wget make git unzip gnupg software-properties-common jq &&\

## TerraForm
(wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null) &&\
gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint &&\
(echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/hashicorp.list) &&\
apt-get update &&\
apt-get install -y terraform &&\

## AWS CLI
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "/tmp/awscliv2.zip" &&\
unzip /tmp/awscliv2.zip &&\
./aws/install &&\
rm /tmp/* -Rf &&\
rm ./aws -Rf &&\

## Helm
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 &&\
chmod 700 get_helm.sh &&\
./get_helm.sh &&\
rm ./get_helm.sh &&\

## See https://github.com/actions/checkout/issues/956
groupmod -g 1000 runner && usermod -u 1000 runner
groupmod -g 1000 runner && usermod -u 1000 runner &&\

## Clean up /tmp and /var/cache aggressively
rm /tmp/* -Rf &&\
rm /var/cache/* -Rf

USER runner

Expand Down
Loading