Adding semgrep yaml file #19
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
# Anytime we push to any branch | |
on: push | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ^1.15 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Install clang | |
run: | | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key 2>/dev/null | sudo apt-key add - | |
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main' | sudo tee /etc/apt/sources.list.d/clang.list | |
# Only update the llvm repo, this is a lot faster. | |
sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/clang.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0" | |
sudo apt-get install -y --no-install-recommends clang-12 | |
- name: Check lint | |
# gofmt doesn't report any changes | |
run: test -z $(gofmt -l ./ | tee /dev/stderr) | |
- name: Run tests | |
run: | | |
sudo sysctl -w net.core.optmem_max=22528 | |
go test -tags cgotest -exec sudo ./... |