Skip to content

[WIP] test: run root test with build flag #2170

[WIP] test: run root test with build flag

[WIP] test: run root test with build flag #2170

Workflow file for this run

name: Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ['1.22']
name: Go ${{ matrix.go }}
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Test and build
run: |
go test -race ./... -check.vv
go build ./cmd/pebble
root-tests:
runs-on: ubuntu-latest
name: Root Tests
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Test
run: |
PEBBLE_TEST_USER=runner PEBBLE_TEST_GROUP=runner sudo -E -H go test -count=1 -tags=roottest -run=TestWithRoot ./...
go test -c ./internals/overlord/servstate/
PEBBLE_TEST_USER=runner PEBBLE_TEST_GROUP=runner sudo -E -H ./servstate.test -check.v -check.f ^S.TestUserGroup$
format:
runs-on: ubuntu-latest
name: Format check
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Ensure no formatting changes
run: |
go fmt ./...
git diff --exit-code
docs:
runs-on: ubuntu-latest
name: Automated docs check
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install tox
run: pip install tox~=4.17
- name: Ensure no CLI reference doc changes
run: |
tox -e commands
git diff --exit-code
working-directory: ./docs