2021-03-23 08:26:35 +00:00
|
|
|
name: conformance
|
|
|
|
|
2022-11-26 13:09:19 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-03-23 08:26:35 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
|
2022-09-24 06:56:30 +00:00
|
|
|
permissions:
|
|
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
|
2021-03-23 08:26:35 +00:00
|
|
|
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:
|
2021-12-20 15:39:09 +00:00
|
|
|
-
|
|
|
|
name: Checkout
|
2023-12-29 23:06:01 +00:00
|
|
|
uses: actions/checkout@v4
|
2021-03-23 08:26:35 +00:00
|
|
|
with:
|
2021-12-20 15:39:09 +00:00
|
|
|
fetch-depth: 0
|
|
|
|
-
|
|
|
|
name: Build image
|
2024-01-12 10:03:05 +00:00
|
|
|
uses: docker/bake-action@v4
|
2021-03-23 08:26:35 +00:00
|
|
|
with:
|
2021-12-20 15:39:09 +00:00
|
|
|
targets: image-local
|
|
|
|
-
|
|
|
|
name: Start distribution server
|
2021-03-23 08:26:35 +00:00
|
|
|
run: |
|
|
|
|
IP=`hostname -I | awk '{print $1}'`
|
|
|
|
echo "IP=$IP" >> $GITHUB_ENV
|
|
|
|
echo "OCI_ROOT_URL=http://$IP:5000" >> $GITHUB_ENV
|
2021-12-20 15:39:09 +00:00
|
|
|
DISTRIBUTION_REF="registry:local"
|
|
|
|
docker run --rm -p 5000:5000 -e REGISTRY_STORAGE_DELETE_ENABLED=true -idt "registry:local"
|
|
|
|
-
|
|
|
|
name: Run OCI Distribution Spec conformance tests
|
2023-08-02 17:02:23 +00:00
|
|
|
uses: opencontainers/distribution-spec@v1.0.1
|
2021-03-23 08:26:35 +00:00
|
|
|
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
|
2021-12-20 15:46:28 +00:00
|
|
|
-
|
|
|
|
name: Move test results
|
|
|
|
run: mkdir -p .out/ && mv {report.html,junit.xml} .out/
|
|
|
|
-
|
|
|
|
name: Upload test results
|
2024-01-15 09:40:46 +00:00
|
|
|
uses: actions/upload-artifact@v4.1.0
|
2021-12-20 15:46:28 +00:00
|
|
|
with:
|
|
|
|
name: oci-test-results-${{ github.sha }}
|
|
|
|
path: .out/
|
|
|
|
if-no-files-found: error
|