forked from project-zot/zot
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (62 loc) · 2.01 KB
/
oci-conformance-action.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# 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
permissions: read-all
# 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.23
uses: actions/setup-go@v5
with:
cache: false
go-version: 1.23.x
- name: Checkout this PR
uses: actions/checkout@v4
- 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
- uses: actions/checkout@v4
with:
repository: opencontainers/distribution-spec
ref: main
path: distribution-spec
- name: build conformance binary from main
run: |
(cd distribution-spec/ && make conformance-binary)
mv distribution-spec/output/conformance.test .
rm -rf distribution-spec/
- name: run conformance
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_MANAGEMENT: 1
OCI_REFERRERS: 1
OCI_CROSSMOUNT_NAMESPACE: oci-conformance/crossmount-test
run: |
./conformance.test
- run: mkdir -p .out/ && mv {report.html,junit.xml} .out/
if: always()
- name: Upload test results zip as build artifact
uses: actions/upload-artifact@v4
with:
name: oci-test-results-${{ github.sha }}
path: .out/
if: github.event_name == 'push'