-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into opentelemetry_upgrade_0.10.0
- Loading branch information
Showing
52 changed files
with
740 additions
and
136 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
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,12 @@ | ||
# Set up caching on local disk so incremental builds are faster | ||
# See https://bazel.build/designs/2016/09/30/repository-cache.html | ||
build --repository_cache=~/.cache/bazel-repo | ||
test --repository_cache=~/.cache/bazel-repo | ||
# See https://docs.bazel.build/versions/master/remote-caching.html#disk-cache | ||
build --disk_cache=~/.cache/bazel-disk | ||
test --disk_cache=~/.cache/bazel-disk" | ||
|
||
# Make output easier to read | ||
build --curses=no | ||
build --color=no | ||
build --show_timestamps |
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,11 @@ | ||
name: 'Run bazel query and pass found targets to bazel test' | ||
inputs: | ||
query: # id of input | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: | | ||
cp .github/.bazelrc.local . | ||
bazel query "${{ inputs.query }}" | xargs bazel test | ||
shell: bash |
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,11 @@ | ||
name: 'Run bazel' | ||
inputs: | ||
command: # id of input | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: | | ||
cp .github/.bazelrc.local . | ||
bazel ${{ inputs.command }} | ||
shell: bash |
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,12 @@ | ||
name: 'Setup bazelisk' | ||
inputs: | ||
version: # id of input | ||
required: false | ||
default: 'v1.7.4' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: | | ||
curl -L -o bazelisk "https://github.com/bazelbuild/bazelisk/releases/download/v1.7.4/bazelisk-linux-amd64" | ||
chmod +x bazelisk && sudo mv bazelisk /usr/local/bin/bazel | ||
shell: bash |
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,21 @@ | ||
name: 'Setup Chrome and chromedriver' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: | | ||
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | ||
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list.d/google-chrome.list | ||
sudo apt-get update -qqy | ||
sudo apt-get -qqy install google-chrome-stable | ||
CHROME_VERSION=$(google-chrome-stable --version) | ||
CHROME_FULL_VERSION=${CHROME_VERSION%%.*} | ||
CHROME_MAJOR_VERSION=${CHROME_FULL_VERSION//[!0-9]} | ||
sudo rm /etc/apt/sources.list.d/google-chrome.list | ||
export CHROMEDRIVER_VERSION=`curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION%%.*}` | ||
curl -L -O "https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip" | ||
unzip chromedriver_linux64.zip && chmod +x chromedriver && sudo mv chromedriver /usr/local/bin | ||
export CHROMEDRIVER_VERSION=`curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION%%.*}` | ||
curl -L -O "https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip" | ||
unzip chromedriver_linux64.zip && chmod +x chromedriver && sudo mv chromedriver /usr/local/bin | ||
chromedriver -version | ||
shell: bash |
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,13 @@ | ||
name: 'Setup Firefox and geckodriver' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: | | ||
GECKODRIVER_URL=`curl -Ls -o /dev/null -w %{url_effective} https://github.com/mozilla/geckodriver/releases/latest` | ||
GECKODRIVER_VERSION=`echo $GECKODRIVER_URL | sed 's#.*/##'` | ||
export GECKODRIVER_DOWNLOAD="https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/geckodriver-$GECKODRIVER_VERSION-linux64.tar.gz" | ||
curl -L -o geckodriver.tar.gz $GECKODRIVER_DOWNLOAD | ||
gunzip -c geckodriver.tar.gz | tar xopf - | ||
chmod +x geckodriver && sudo mv geckodriver /usr/local/bin | ||
geckodriver --version | ||
shell: bash |
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,184 @@ | ||
name: Java workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- trunk | ||
pull_request: | ||
branches: | ||
- trunk | ||
|
||
env: | ||
NODE_VERSION: '13.x' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source tree | ||
uses: actions/checkout@v2 | ||
- name: Cache Bazel artifacts | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cache/bazel-disk | ||
~/.cache/bazel-repo | ||
key: ${{ runner.os }}-bazel-build-${{ hashFiles('**/BUILD.bazel') }} | ||
restore-keys: | | ||
${{ runner.os }}-bazel-build- | ||
- name: Setup bazelisk | ||
uses: ./.github/actions/setup-bazelisk | ||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '11' | ||
- name: Build grid | ||
uses: ./.github/actions/bazel | ||
with: | ||
command: build grid | ||
|
||
small_tests: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source tree | ||
uses: actions/checkout@v1 | ||
- name: Cache Bazel artifacts | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cache/bazel-disk | ||
~/.cache/bazel-repo | ||
key: ${{ runner.os }}-bazel-small-tests-${{ hashFiles('**/BUILD.bazel') }} | ||
restore-keys: | | ||
${{ runner.os }}-bazel-small-tests- | ||
${{ runner.os }}-bazel-build- | ||
- name: Setup bazelisk | ||
uses: ./.github/actions/setup-bazelisk | ||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '11' | ||
- name: Run small tests | ||
uses: ./.github/actions/bazel-test | ||
with: | ||
query: attr(size, small, tests(//java/...)) except attr(tags, lint, tests(//java/...)) | ||
|
||
lint: | ||
needs: small_tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source tree | ||
uses: actions/checkout@v1 | ||
- name: Cache Bazel artifacts | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cache/bazel-disk | ||
~/.cache/bazel-repo | ||
key: ${{ runner.os }}-bazel-lint-${{ hashFiles('**/BUILD.bazel') }} | ||
restore-keys: | | ||
${{ runner.os }}-bazel-lint- | ||
${{ runner.os }}-bazel-build- | ||
- name: Setup bazelisk | ||
uses: ./.github/actions/setup-bazelisk | ||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '11' | ||
- name: Run linter | ||
uses: ./.github/actions/bazel-test | ||
with: | ||
query: attr(tags, lint, tests(//java/...)) | ||
|
||
chrome_tests: | ||
needs: small_tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source tree | ||
uses: actions/checkout@v1 | ||
- name: Cache Bazel artifacts | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cache/bazel-disk | ||
~/.cache/bazel-repo | ||
key: ${{ runner.os }}-bazel-chrome-tests-${{ hashFiles('**/BUILD.bazel') }} | ||
restore-keys: | | ||
${{ runner.os }}-bazel-chrome-tests- | ||
${{ runner.os }}-bazel-build- | ||
- name: Setup bazelisk | ||
uses: ./.github/actions/setup-bazelisk | ||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '11' | ||
- name: Setup Chrome and chromedriver | ||
uses: ./.github/actions/setup-chrome | ||
- name: Run browser tests in Chrome | ||
uses: ./.github/actions/bazel-test | ||
with: | ||
query: attr(tags, chrome, tests(//java/client/...)) except attr(tags, remote, tests(//java/client/...)) | ||
|
||
firefox_tests: | ||
needs: small_tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source tree | ||
uses: actions/checkout@v1 | ||
- name: Cache Bazel artifacts | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cache/bazel-disk | ||
~/.cache/bazel-repo | ||
key: ${{ runner.os }}-bazel-firefox-tests-${{ hashFiles('**/BUILD.bazel') }} | ||
restore-keys: | | ||
${{ runner.os }}-bazel-firefox-tests- | ||
${{ runner.os }}-bazel-build- | ||
- name: Setup bazelisk | ||
uses: ./.github/actions/setup-bazelisk | ||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '11' | ||
- name: Setup Firefox and geckodriver | ||
uses: ./.github/actions/setup-firefox | ||
- name: Run browser tests in Firefox | ||
uses: ./.github/actions/bazel-test | ||
with: | ||
query: attr(tags, firefox, tests(//java/client/...)) except attr(tags, remote, tests(//java/client/...)) | ||
|
||
|
||
server_tests: | ||
needs: small_tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source tree | ||
uses: actions/checkout@v1 | ||
- name: Cache Bazel artifacts | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cache/bazel-disk | ||
~/.cache/bazel-repo | ||
key: ${{ runner.os }}-bazel-firefox-tests-${{ hashFiles('**/BUILD.bazel') }} | ||
restore-keys: | | ||
${{ runner.os }}-bazel-firefox-tests- | ||
${{ runner.os }}-bazel-build- | ||
- name: Setup bazelisk | ||
uses: ./.github/actions/setup-bazelisk | ||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '11' | ||
- name: Setup Chrome and chromedriver | ||
uses: ./.github/actions/setup-chrome | ||
- name: Setup Firefox and geckodriver | ||
uses: ./.github/actions/setup-firefox | ||
- name: Run server tests | ||
env: | ||
MOZ_HEADLESS: 1 | ||
uses: ./.github/actions/bazel-test | ||
with: | ||
query: tests(//java/server/...) except attr(tags, 'lint|ie|edge|edgehtml|safari', tests(//java/server/...)) |
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,33 @@ | ||
name: JavaScript workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- trunk | ||
pull_request: | ||
branches: | ||
- trunk | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source tree | ||
uses: actions/checkout@v2 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 15 | ||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Setup bazelisk | ||
uses: ./.github/actions/setup-bazelisk | ||
- name: Start XVFB | ||
run: Xvfb :99 & | ||
- name: Run JavaScript tests on Firefox | ||
run: bazel test //javascript/node/selenium-webdriver:tests | ||
env: | ||
DISPLAY: :99 | ||
SELENIUM_BROWSER: firefox |
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
Oops, something went wrong.