# This is a conformance test workflow that is automatically triggered with each PR name: conformance # Controls when the action will run. Workflow runs when manually triggered using the UI # or API. on: push: branches: - main pull_request: branches: - main # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: run: runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: - name: Install go 1.17 uses: actions/setup-go@v2 with: go-version: 1.17.x - name: Checkout this PR uses: actions/checkout@v2 - name: Start zot server run: | cd $GITHUB_WORKSPACE make binary RUNNER_TRACKING_ID="" && ./bin/zot-linux-amd64 serve examples/config-conformance.json & IP=`hostname -I | awk '{print $1}'` echo "SERVER_URL=http://${IP}:8080" >> $GITHUB_ENV - name: Run OCI Distribution Spec conformance tests uses: opencontainers/distribution-spec@main env: OCI_ROOT_URL: ${{ env.SERVER_URL }} OCI_NAMESPACE: oci-conformance/distribution-test OCI_TEST_PULL: 1 OCI_TEST_PUSH: 1 OCI_TEST_CONTENT_DISCOVERY: 1 OCI_TEST_CONTENT_MANGEMENT: 1 OCI_HIDE_SKIPPED_WORKFLOWS: 1 - run: mkdir -p .out/ && mv {report.html,junit.xml} .out/ if: always() #run: docker run --rm -v $(pwd)/results:/results -w /results -e OCI_ROOT_URL=${{ env.OCI_ROOT_URL }} -e OCI_NAMESPACE="anuvu/zot" -e OCI_TEST_PULL=1 -e OCI_TEST_PUSH=1 -e OCI_TEST_CONTENT_DISCOVERY=1 -e OCI_TEST_CONTENT_MANAGEMENT=1 -e OCI_HIDE_SKIPPED_WORKFLOWS=0 -e OCI_DEBUG="true" ghcr.io/opencontainers/distribution-spec/conformance:db4cc68 - name: Upload test results zip as build artifact uses: actions/upload-artifact@v1 with: name: oci-test-results-${{ github.sha }} path: .out/ if: github.event == 'push'