fix(internal/librarian): default to source_roots when no remove_regex #3421
Workflow file for this run
This file contains hidden or 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 Google LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: Librarian | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Display Go version | |
run: go version | |
- name: Install tools | |
run: | | |
set -e | |
curl -fSSL -o /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v28.3/protoc-28.3-linux-x86_64.zip | |
cd /usr/local | |
sudo unzip -x /tmp/protoc.zip | |
protoc --version | |
go install github.com/google/yamlfmt/cmd/[email protected] | |
go install golang.org/x/tools/cmd/goimports@latest | |
- name: Run tests | |
run: go test -race -coverprofile=coverage.out -covermode=atomic ./... | |
- name: Check YAML formatting | |
run: | | |
yamlfmt . | |
- name: Detect formatting changes | |
run: git diff --exit-code | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
e2e-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-docker-action@v4 | |
- name: Build the test image | |
run: | | |
DOCKER_BUILDKIT=1 docker build \ | |
-f ./testdata/e2e-test.Dockerfile \ | |
-t test-image:latest \ | |
. | |
- name: Run end-to-end test | |
run: | | |
go test -tags e2e ./... |