Use sudo when checking DNS outside VPN tunnel #2909
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
name: CI | |
on: | |
pull_request: | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
permissions: {} | |
jobs: | |
lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | |
with: | |
go-version: '1.22.2' | |
cache: false # golangci-lint caching doesn't seem to get along with setup-go caching | |
- uses: golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299 # v3.6.0 | |
with: | |
version: v1.55.2 | |
args: -v --config=.golangci-lint.yml | |
shellcheck: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Install shellcheck | |
run: | | |
tag="v0.9.0"; \ | |
url_base='https://github.com/koalaman/shellcheck/releases/download'; \ | |
tar_file="${tag}/shellcheck-${tag}.linux.x86_64.tar.xz"; \ | |
wget "${url_base}/${tar_file}" -O - | tar xJf -; \ | |
sudo mv "shellcheck-${tag}/shellcheck" /bin/ | |
- run: ci/shellcheck.sh | |
env: | |
WORKDIR: ${{ github.workspace }} | |
test-go: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | |
with: | |
go-version: '1.22.2' | |
- run: ./ci/test.sh | |
env: | |
WORKDIR: ${{ github.workspace }} | |
gosec: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | |
with: | |
go-version: '1.20' | |
- run: go install github.com/securego/gosec/v2/cmd/[email protected] | |
- run: gosec -quiet -exclude-dir=third-party ./... | |
ruff: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 | |
with: | |
python-version: '3.11' | |
- name: Install pip and ruff | |
run: | | |
python -m pip install --upgrade pip | |
pip install ruff==0.6.4 | |
- name: Run ruff | |
run: ruff check --output-format=github test/qa |