-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into bugfix/enforce-init…
…-flags
- Loading branch information
Showing
2,472 changed files
with
563,211 additions
and
31,804 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Copyright 2022 The Knative Authors. | ||
# | ||
# 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 | ||
# | ||
# http://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: Test | ||
|
||
on: | ||
push: | ||
branches: [ 'main', 'release-*' ] | ||
pull_request: | ||
branches: [ 'main', 'release-*' ] | ||
|
||
jobs: | ||
|
||
test: | ||
name: Unit Tests on Windows | ||
runs-on: windows-latest | ||
|
||
steps: | ||
|
||
- name: Set up Go 1.18 | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18.x | ||
id: go | ||
|
||
- name: Set git autocrlf to input | ||
run: git config --global core.autocrlf input | ||
id: git-crlf | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Merge upstream | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
if ! git config user.name > /dev/null; then | ||
git config user.name "John Doe" | ||
fi | ||
if ! git config user.email > /dev/null; then | ||
git config user.email "johndoe@localhost" | ||
fi | ||
git remote add upstream https://github.com/${{ github.repository }}.git | ||
git fetch upstream ${{ github.base_ref }} | ||
git pull --no-rebase --no-commit upstream ${{ github.base_ref }} | ||
shell: bash | ||
|
||
- name: Test | ||
run: go run gotest.tools/[email protected] | ||
--format testname | ||
--junitfile "tmp/junit_tests.xml" | ||
--junitfile-testsuite-name relative | ||
--junitfile-testcase-classname relative | ||
--jsonfile "tmp/logfile.jsonl" -- | ||
-race -count=1 -short ./... |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,19 +11,15 @@ jobs: | |
e2e-tests: | ||
strategy: | ||
matrix: | ||
go-version: [ 1.16.x ] | ||
go-version: [ 1.18.x ] | ||
platform: [ ubuntu-latest ] | ||
ko-version: [ 0.8.1 ] | ||
kind-version: [ 0.11.1 ] | ||
kind-version: [ 0.14.0 ] | ||
|
||
name: e2e tests | ||
runs-on: ${{ matrix.platform }} | ||
|
||
env: | ||
GOPATH: ${{ github.workspace }} | ||
GO111MODULE: off | ||
KO_DOCKER_REPO: kind.local | ||
KO_VERSION: ${{ matrix.ko-version }} | ||
KIND_VERSION: ${{ matrix.kind-version }} | ||
|
||
steps: | ||
|
@@ -33,14 +29,6 @@ jobs: | |
go-version: ${{ matrix.go-version }} | ||
id: go | ||
|
||
- name: Install Dependencies | ||
run: | | ||
echo '::group:: install ko ${KO_VERSION}' | ||
curl -L https://github.com/google/ko/releases/download/v${KO_VERSION}/ko_${KO_VERSION}_Linux_x86_64.tar.gz | tar xzf - ko | ||
chmod +x ./ko | ||
sudo mv ko /usr/local/bin | ||
echo '::endgroup::' | ||
- name: Check out code onto GOPATH | ||
uses: actions/checkout@v2 | ||
with: | ||
|
@@ -96,7 +84,8 @@ jobs: | |
kubectl apply -f ./test/config | ||
# Run the tests tagged as e2e on the KinD cluster. | ||
go test -v -race -count=1 -timeout=15m -tags=e2e ./test/... | ||
go run gotest.tools/[email protected] --format testname -- \ | ||
-race -count=1 -timeout=15m -tags=e2e ./test/... | ||
- name: Gather Failure Data | ||
if: ${{ failure() }} | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,14 @@ | ||
# Copyright 2020 The Knative Authors. | ||
# | ||
# 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 | ||
# | ||
# http://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. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# This file is automagically synced here from github.com/knative-sandbox/.github | ||
# repo by knobots: https://github.com/knative-sandbox/knobots and will be overwritten. | ||
# This file is automagically synced here from github.com/knative-sandbox/knobots | ||
|
||
name: Build | ||
|
||
on: | ||
pull_request: | ||
branches: [ 'main', 'master', 'release-*' ] | ||
branches: [ 'main', 'release-*' ] | ||
|
||
jobs: | ||
|
||
build: | ||
name: Build | ||
strategy: | ||
matrix: | ||
go-version: [1.17.x] | ||
platform: [ubuntu-latest] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
|
||
- name: Set up Go ${{ matrix.go-version }} | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
id: go | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- id: go_mod | ||
uses: andstor/file-existence-action@v1 | ||
with: | ||
files: go.mod | ||
|
||
- name: Build | ||
if: ${{ steps.go_mod.outputs.files_exists == 'true' }} | ||
run: | | ||
tags="$(grep -I -r '// +build' . | \ | ||
grep -v '^./vendor/' | \ | ||
grep -v '^./hack/' | \ | ||
grep -v '^./third_party' | \ | ||
cut -f3 -d' ' | \ | ||
tr ',' '\n' | \ | ||
sort | uniq | \ | ||
grep -v '^!' | \ | ||
tr '\n' ' ')" | ||
echo "Building with tags: ${tags}" | ||
go test -vet=off -tags "${tags}" -exec echo ./... | ||
uses: knative/actions/.github/workflows/go-build.yaml@main |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,17 @@ | ||
# Copyright 2020 The Knative Authors. | ||
# | ||
# 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 | ||
# | ||
# http://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. | ||
# Copyright 2022 The Knative Authors. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# This file is automagically synced here from github.com/knative-sandbox/.github | ||
# repo by knobots: https://github.com/knative-sandbox/knobots and will be overwritten. | ||
# This file is automagically synced here from github.com/knative-sandbox/knobots | ||
|
||
name: Test | ||
|
||
on: | ||
|
||
push: | ||
branches: [ 'main', 'master' ] | ||
branches: [ 'main', 'release-*' ] | ||
|
||
pull_request: | ||
branches: [ 'main', 'master', 'release-*' ] | ||
branches: [ 'main', 'release-*' ] | ||
|
||
jobs: | ||
|
||
test: | ||
name: Unit Tests | ||
strategy: | ||
matrix: | ||
go-version: [1.17.x] | ||
platform: [ubuntu-latest] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
|
||
- name: Set up Go ${{ matrix.go-version }} | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
id: go | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Merge upstream | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
if ! git config user.name > /dev/null; then | ||
git config user.name "John Doe" | ||
fi | ||
if ! git config user.email > /dev/null; then | ||
git config user.email "johndoe@localhost" | ||
fi | ||
git remote add upstream https://github.com/${{ github.repository }}.git | ||
git fetch upstream ${{ github.base_ref }} | ||
git pull --no-rebase --no-commit upstream ${{ github.base_ref }} | ||
shell: bash | ||
|
||
- name: Check for .codecov.yaml | ||
id: codecov-enabled | ||
uses: andstor/file-existence-action@v1 | ||
with: | ||
files: .codecov.yaml | ||
|
||
- if: steps.codecov-enabled.outputs.files_exists == 'true' | ||
name: Produce Go Coverage | ||
run: echo 'COVER_OPTS=-coverprofile=coverage.txt -covermode=atomic' >> $GITHUB_ENV | ||
|
||
- name: Test | ||
run: go test -race $COVER_OPTS ./... | ||
|
||
- if: steps.codecov-enabled.outputs.files_exists == 'true' | ||
name: Codecov | ||
uses: codecov/codecov-action@v1 | ||
uses: knative/actions/.github/workflows/go-test.yaml@main |
Oops, something went wrong.