0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00

test(annotations): print logs for annotations bats tests (#1680)

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
This commit is contained in:
LaurentiuNiculae 2023-08-07 23:51:57 +03:00 committed by GitHub
parent 76277f5ebd
commit ed90e3bd24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 1 deletions

View file

@ -21,6 +21,7 @@ jobs:
with: with:
cache: false cache: false
go-version: 1.20.x go-version: 1.20.x
- uses: ./.github/actions/clean-runner
- name: Install dependencies - name: Install dependencies
run: | run: |
cd $GITHUB_WORKSPACE cd $GITHUB_WORKSPACE
@ -52,6 +53,21 @@ jobs:
make bin/dex make bin/dex
./bin/dex serve $GITHUB_WORKSPACE/test/dex/config-dev.yaml & ./bin/dex serve $GITHUB_WORKSPACE/test/dex/config-dev.yaml &
cd $GITHUB_WORKSPACE cd $GITHUB_WORKSPACE
- name: Check disk space before build
run: |
cd $GITHUB_WORKSPACE
set -x
df -h
sudo ls -lRh /tmp/* || true
sudo du -sh /tmp || true
sudo du -sh /tmp/* || true
sudo find /tmp/ -size +5M | sudo xargs ls -lh
du -sh ./* || true
find ./ -size +5M | xargs ls -lh
sudo du -sh /var/
sudo du -sh /var/lib/docker/
du -sh /home/runner/work/
set +x
- name: Run referrers tests - name: Run referrers tests
run: | run: |
make test-bats-referrers make test-bats-referrers
@ -95,3 +111,19 @@ jobs:
env: env:
AWS_ACCESS_KEY_ID: fake AWS_ACCESS_KEY_ID: fake
AWS_SECRET_ACCESS_KEY: fake AWS_SECRET_ACCESS_KEY: fake
- name: Check disk space after build
if: always()
run: |
cd $GITHUB_WORKSPACE
set -x
df -h
sudo ls -lRh /tmp/* || true
sudo du -sh /tmp || true
sudo du -sh /tmp/* || true
sudo find /tmp/ -size +5M | sudo xargs ls -lh
du -sh ./* || true
find ./ -size +5M | xargs ls -lh
sudo du -sh /var/
sudo du -sh /var/lib/docker/
du -sh /home/runner/work/
set +x

View file

@ -24,7 +24,8 @@ function setup_file() {
"port": "8080" "port": "8080"
}, },
"log": { "log": {
"level": "debug" "level": "debug",
"output": "${BATS_FILE_TMPDIR}/zot.log"
}, },
"extensions":{ "extensions":{
"search": { "search": {
@ -57,6 +58,7 @@ EOF
} }
function teardown_file() { function teardown_file() {
cat ${BATS_FILE_TMPDIR}/zot.log >&3
local zot_root_dir=${BATS_FILE_TMPDIR}/zot local zot_root_dir=${BATS_FILE_TMPDIR}/zot
local oci_data_dir=${BATS_FILE_TMPDIR}/oci local oci_data_dir=${BATS_FILE_TMPDIR}/oci
local roots_data_dir=${BATS_FILE_TMPDIR}/roots local roots_data_dir=${BATS_FILE_TMPDIR}/roots