2021-01-27 20:29:24 -05:00
|
|
|
# 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:
|
2021-10-21 13:13:14 -05:00
|
|
|
- main
|
2021-01-27 20:29:24 -05:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2021-10-21 13:13:14 -05:00
|
|
|
- main
|
2021-01-27 20:29:24 -05:00
|
|
|
|
|
|
|
# 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:
|
2022-06-07 00:53:33 -05:00
|
|
|
- name: Install go 1.18
|
2022-04-07 06:48:54 -05:00
|
|
|
uses: actions/setup-go@v2
|
2021-01-27 20:29:24 -05:00
|
|
|
with:
|
2022-06-07 00:53:33 -05:00
|
|
|
go-version: 1.18.x
|
2022-04-07 06:48:54 -05:00
|
|
|
- name: Checkout this PR
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Start zot server
|
2021-01-27 20:29:24 -05:00
|
|
|
run: |
|
2022-04-07 06:48:54 -05:00
|
|
|
cd $GITHUB_WORKSPACE
|
|
|
|
make binary
|
|
|
|
RUNNER_TRACKING_ID="" && ./bin/zot-linux-amd64 serve examples/config-conformance.json &
|
2021-01-27 20:29:24 -05:00
|
|
|
IP=`hostname -I | awk '{print $1}'`
|
2022-04-07 06:48:54 -05:00
|
|
|
echo "SERVER_URL=http://${IP}:8080" >> $GITHUB_ENV
|
2021-01-27 20:29:24 -05:00
|
|
|
- name: Run OCI Distribution Spec conformance tests
|
2021-04-19 11:47:43 -05:00
|
|
|
uses: opencontainers/distribution-spec@main
|
2021-01-27 20:29:24 -05:00
|
|
|
env:
|
2021-10-15 10:05:00 -05:00
|
|
|
OCI_ROOT_URL: ${{ env.SERVER_URL }}
|
2021-01-27 20:29:24 -05:00
|
|
|
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'
|