2021-03-23 08:26:35 +00:00
|
|
|
name: conformance
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
|
|
|
|
jobs:
|
2021-06-30 07:20:39 +00:00
|
|
|
run-conformance-test:
|
2021-03-23 08:26:35 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: set up docker
|
|
|
|
uses: docker-practice/actions-setup-docker@0.0.1
|
|
|
|
with:
|
|
|
|
docker_version: 18.09
|
|
|
|
docker_channel: stable
|
|
|
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
path: src/github.com/distribution/distribution
|
|
|
|
|
|
|
|
- name: start distribution server
|
|
|
|
working-directory: ./src/github.com/distribution/distribution
|
|
|
|
run: |
|
|
|
|
IP=`hostname -I | awk '{print $1}'`
|
|
|
|
echo "IP=$IP" >> $GITHUB_ENV
|
|
|
|
echo "OCI_ROOT_URL=http://$IP:5000" >> $GITHUB_ENV
|
|
|
|
DISTRIBUTION_REF="local-distribution:v$(date +%Y%m%d%H%M%S)"
|
|
|
|
docker build -f ./Dockerfile -t "${DISTRIBUTION_REF}" .
|
2021-06-27 21:45:36 +00:00
|
|
|
docker run --rm -p 5000:5000 -e REGISTRY_STORAGE_DELETE_ENABLED=true -idt "${DISTRIBUTION_REF}"
|
2021-03-23 08:26:35 +00:00
|
|
|
|
|
|
|
- name: Run OCI Distribution Spec conformance tests
|
|
|
|
uses: opencontainers/distribution-spec@main
|
|
|
|
env:
|
|
|
|
OCI_ROOT_URL: ${{ env.OCI_ROOT_URL }}
|
|
|
|
OCI_NAMESPACE: oci-conformance/distribution-test
|
|
|
|
OCI_TEST_PULL: 1
|
|
|
|
OCI_TEST_PUSH: 1
|
|
|
|
OCI_TEST_CONTENT_DISCOVERY: 1
|
|
|
|
OCI_TEST_CONTENT_MANAGEMENT: 1
|
2021-06-30 07:20:39 +00:00
|
|
|
OCI_HIDE_SKIPPED_WORKFLOWS: 1
|