-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #293 from WaberZhuang/main
CI: prevent remote code execution through github action
- Loading branch information
Showing
2 changed files
with
36 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Unit Test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
unit-test: | ||
name: Unit Test | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: src/github.com/containerd/accelerated-container-image | ||
fetch-depth: 100 | ||
|
||
- name: install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22.0' | ||
|
||
- name: set env | ||
shell: bash | ||
run: | | ||
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV | ||
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH | ||
- name: unit test | ||
working-directory: src/github.com/containerd/accelerated-container-image | ||
run: | | ||
sudo GO_TESTFLAGS=-v make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters