Skip to content

Commit

Permalink
Add initial tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oxpa committed Sep 4, 2024
1 parent 676b899 commit 79ba52b
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: test pruner


on:
push:
paths:
- 'experimental/**'
- '.github/**'
workflow_dispatch:

defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'

permissions:
contents: read

jobs:
build_and_prune:
runs-on: "ubuntu-latest"
services:
registry:
image: registry:2
ports:
- 5000:5000
env:
REGISTRY_STORAGE: "s3"
REGISTRY_STORAGE_S3_BUCKET: "s3mock"
REGISTRY_STORAGE_S3_V4AUTH: "false"
REGISTRY_STORAGE_S3_REGION: "generic"
REGISTRY_STORAGE_S3_REGIONENDPOINT: "http://s3mock:9090"
REGISTRY_STORAGE_S3_SECURE: "false"
REGISTRY_STORAGE_S3_ACCESSKEY: "123"
REGISTRY_STORAGE_S3_SECRETKEY: "123"
REGISTRY_STORAGE_REDIRECT_DISABLE: "true"
credentials:
username: oxpa
password: ${{ secrets.DOCKERHUB_PASS }}
s3mock:
image: adobe/s3mock
ports:
- 9090:9090
env:
initialBuckets: testme
credentials:
username: oxpa
password: ${{ secrets.DOCKERHUB_PASS }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Login to Dockerhub
uses: docker/login-action@v3
with:
username: oxpa
password: ${{ secrets.DOCKERHUB_PASS }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64v8, amd64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host


- name: Build test images
id: build
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
env:
SOURCE_DATE_EPOCH: 123
with:
file: "tests/Dockerfile"
context: "."
platforms: "amd64,arm64"
tags: "localhost:9090/tests/image1:tag1,localhost:9090/tests/image2:tag1"
outputs: type=registry,push=true,rewrite-timestamp=true

0 comments on commit 79ba52b

Please sign in to comment.