mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 11:37:56 +08:00
9aff5b8d08
* chore: fix dependabot alerts Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * chore: fix dependabot alerts Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * chore: fix dependabot alerts Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * chore: fix golangci-lint findings from CI Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * chore: fix golangci-lint gosec warnings Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * chore: update code to use slices package and address gosec linting issues Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * build: fix makefile target Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * chore: update tests to use context in HTTP requests and add gosec annotations Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * chore: update tests to use context in HTTP requests Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * chore: update tests to use context in HTTP requests Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * chore: update tests to use context in HTTP requests Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * chore: update tests to use context in HTTP requests Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * chore: bump zui version Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * chore: update test helpers and improve security settings in tests Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> * chore: add gosec linting directive for test path construction Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com> --------- Signed-off-by: Ramkumar Chinchani <rchincha.dev@gmail.com>
71 lines
2.3 KiB
YAML
71 lines
2.3 KiB
YAML
# 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@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
|
with:
|
|
cache: false
|
|
check-latest: true
|
|
go-version: 1.26.x
|
|
- name: Checkout this PR
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
repository: opencontainers/distribution-spec
|
|
ref: main
|
|
path: distribution-spec
|
|
persist-credentials: false
|
|
- 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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: oci-test-results-${{ github.sha }}
|
|
path: .out/
|
|
if: github.event_name == 'push'
|