Updated path
This commit is contained in:
22
.github-disabled/workflows/lint.yaml-disabled
Normal file
22
.github-disabled/workflows/lint.yaml-disabled
Normal file
@@ -0,0 +1,22 @@
|
||||
on: [push, pull_request]
|
||||
name: Lint
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
golangci:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
cache: false
|
||||
- name: Install PAM
|
||||
run: sudo apt install -y libpam-dev
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: v1.54
|
||||
51
.github-disabled/workflows/test.yaml-disabled
Normal file
51
.github-disabled/workflows/test.yaml-disabled
Normal file
@@ -0,0 +1,51 @@
|
||||
on: [push, pull_request]
|
||||
name: Test
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.20.x, 1.21.x]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- name: Install PAM
|
||||
run: |
|
||||
sudo apt update -y
|
||||
sudo apt install -y libpam-dev
|
||||
- name: Install Debug symbols
|
||||
run: |
|
||||
sudo apt install -y ubuntu-dev-tools
|
||||
(cd /tmp && pull-lp-ddebs libpam0g $(lsb_release -c -s))
|
||||
(cd /tmp && pull-lp-ddebs libpam-modules $(lsb_release -c -s))
|
||||
sudo dpkg -i /tmp/libpam*-dbgsym_*.ddeb
|
||||
- name: Add a test user
|
||||
run: sudo useradd -d /tmp/test -p '$1$Qd8H95T5$RYSZQeoFbEB.gS19zS99A0' -s /bin/false test
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Test
|
||||
run: sudo go test -v -cover -coverprofile=coverage.out -coverpkg=./... ./...
|
||||
- name: Test with Address Sanitizer
|
||||
env:
|
||||
GO_PAM_TEST_WITH_ASAN: true
|
||||
CGO_CFLAGS: "-O0 -g3 -fno-omit-frame-pointer"
|
||||
run: |
|
||||
# Do not run sudo-requiring go tests because as PAM has some leaks in 22.04
|
||||
go test -v -asan -cover -coverprofile=coverage-asan-tx.out -coverpkg=./... -gcflags=all="-N -l"
|
||||
|
||||
# Run the rest of tests normally
|
||||
sudo go test -v -cover -coverprofile=coverage-asan-module.out -coverpkg=./... -asan -gcflags=all="-N -l" -run Module
|
||||
sudo go test -C cmd -coverprofile=coverage-asan.out -v -coverpkg=./... -asan -gcflags=all="-N -l" ./...
|
||||
- name: Generate example module
|
||||
run: |
|
||||
rm -f example-module/pam_go.so
|
||||
go generate -C example-module -v
|
||||
test -e example-module/pam_go.so
|
||||
git diff --exit-code example-module
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
Reference in New Issue
Block a user