add boilerplates and ci jobs for lint #8
Workflow file for this run
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
# Copyright 2024 Chainguard, Inc. | |
# SPDX-License-Identifier: Apache-2.0 | |
name: Go Tests | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | |
with: | |
egress-policy: audit | |
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | |
with: | |
go-version: '1.21' | |
check-latest: true | |
- name: Checkout code | |
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
- run: | | |
export CGO_CFLAGS="-I${YARA_SRC}/libyara/include" | |
export CGO_LDFLAGS="-L${YARA_SRC}/libyara/.libs -lyara" | |
go install -tags yara_no_pkg_config github.com/hillu/go-yara/[email protected] | |
- name: Test | |
run: | | |
# sudo apt update && sudo apt install libyara-dev -y | |
make test |