-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from travis to github actions
Also, 1. Use bazelisk to fetch bazel. 2. Improve test script verbosity.
- Loading branch information
1 parent
c72e179
commit ff8231b
Showing
6 changed files
with
98 additions
and
61 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,30 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest] | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v1 | ||
|
||
- name: Install additional packages | ||
if: matrix.os == 'ubuntu-latest' | ||
run: sudo apt-get install libcurl4-openssl-dev | ||
|
||
- name: Run tests | ||
env: | ||
BAZELISK_GITHUB_TOKEN: ${{ secrets.BAZELISK_GITHUB_TOKEN }} | ||
run: tests/run_tests.sh |
This file was deleted.
Oops, something went wrong.
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
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,39 @@ | ||
#!/bin/bash | ||
# Copyright 2018 The Bazel 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. | ||
|
||
# This script is intended to be sourced as a library, and makes available a | ||
# bazel env var. | ||
|
||
os="$(uname -s | tr "[:upper:]" "[:lower:]")" | ||
readonly os | ||
|
||
# Use bazelisk to catch migration problems. | ||
# Value of BAZELISK_GITHUB_TOKEN is set as a secret on Travis. | ||
readonly url="https://github.com/bazelbuild/bazelisk/releases/download/v1.4.0/bazelisk-${os}-amd64" | ||
bazel="${TMPDIR:-/tmp}/bazelisk" | ||
readonly bazel | ||
|
||
if ! [[ -x "${bazel}" ]]; then | ||
curl -L -sSf -o "${bazel}" "${url}" | ||
chmod a+x "${bazel}" | ||
fi | ||
|
||
# Exported for scripts that will source this file. | ||
bazel_test_opts=( | ||
"--color=yes" | ||
"--show_progress_rate_limit=30" | ||
"--keep_going" | ||
"--test_output=errors" | ||
) |