From e217616acf834bc9862bf587d31706100f14bb79 Mon Sep 17 00:00:00 2001 From: Damyan Yordanov Date: Mon, 22 Jan 2024 15:44:20 +0100 Subject: [PATCH] Run golang tests on each PR --- .github/workflows/test.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..3fbdcaf --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +name: Pull Request Code test + +on: + pull_request_target: + paths-ignore: + - 'docs/**' + - '**/*.md' + +jobs: + checks: + name: run + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - uses: actions/setup-go@v4 + with: + go-version-file: go.mod + - run: | + mkdir -p ~/.ssh + for key in rsa ecdsa ed25519; do + ssh-keyscan -t $key github.com 2>/dev/null >> ~/.ssh/known_hosts + done + - uses: webfactory/ssh-agent@v0.8.0 + with: + ssh-private-key: ${{ secrets.BOT_PRIVATE_KEY }} + - run: ./hack/setup-git-redirect.sh + - run: make build + - run: make test