-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1.14 KB
/
test.yaml
File metadata and controls
37 lines (35 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: test
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: 1.24
- name: Setup CodeQL
id: codeqlsetup
uses: github/codeql-action/setup-codeql@v4
- name: Add CodeQL to PATH # see https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands#adding-a-system-path
run: |
# 1. get the full path of CodeQL
FULL_PATH="${{ steps.codeqlsetup.outputs.codeql-path }}"
# 2. use dirname to get the directory of CodeQL binary
CODEQL_DIR=$(dirname "$FULL_PATH")
# 3. add CodeQL directory to GITHUB_PATH
echo "$CODEQL_DIR" >> $GITHUB_PATH
# print the CodeQL directory to confirm
echo "Adding $CODEQL_DIR to PATH"
- name: Test
run: |
./check.sh
- name: Setup tmate session # see https://github.com/mxschmitt/action-tmate#only-on-failure
uses: mxschmitt/action-tmate@v3
if: ${{ failure() }}