ci: set working-directory for test job
This commit is contained in:
parent
93f54aeca5
commit
182f82775a
@ -46,11 +46,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: gitea-job-image
|
image: gitea-job-image
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
steps:
|
steps:
|
||||||
- name: Clone repo
|
- name: Clone repo
|
||||||
run: |
|
run: |
|
||||||
rm -rf $GITHUB_WORKSPACE/*
|
rm -rf ${GITHUB_WORKSPACE:?}/*
|
||||||
git clone --depth 1 $GITEA_URL/$GITHUB_REPOSITORY $GITHUB_WORKSPACE
|
git clone --recurse-submodules $GITEA_URL/$GITHUB_REPOSITORY $GITHUB_WORKSPACE
|
||||||
git -C $GITHUB_WORKSPACE checkout $GITHUB_SHA 2>/dev/null || true
|
git -C $GITHUB_WORKSPACE checkout $GITHUB_SHA 2>/dev/null || true
|
||||||
|
|
||||||
- name: Install Python deps
|
- name: Install Python deps
|
||||||
@ -82,6 +85,15 @@ jobs:
|
|||||||
echo "No Go project detected, skipping go test"
|
echo "No Go project detected, skipping go test"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Run Go tests
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
if [[ -f go.mod ]]; then
|
||||||
|
go test ./...
|
||||||
|
else
|
||||||
|
echo "No Go project detected, skipping go test"
|
||||||
|
fi
|
||||||
|
|
||||||
docker-build:
|
docker-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user