Skip to content

Commit

Permalink
Switch from TravisCI to Github Actions for CI.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 335098666
  • Loading branch information
mattr-google authored and copybara-github committed Oct 2, 2020
1 parent 2cb417d commit daed591
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 14 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
on: [pull_request]

jobs:
run_tests_job:
runs-on: ubuntu-latest
name: run_tests
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run tests
uses: ./ # Uses an action in the root directory
id: run_tests
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ RUN apt-get -y update
RUN apt-get -y install bazel
RUN apt-get -y install python3 python-is-python3 python3-distutils
RUN printf "startup --output_user_root=/tmp/bazel_output\n" > /root/.bazelrc

WORKDIR /root/agent_based_epidemic_sim
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ bazel-bin/agent_based_epidemic_sim/applications/home_work/main \
```shell
docker build -t $USER/abesim .

docker run -t --rm -v $PWD:/root/agent_based_epidemic_sim:cached \
docker run -t --rm -w /root/agent_based_epidemic_sim \
-v $PWD:/root/agent_based_epidemic_sim:cached \
-v /tmp/output:/tmp/output:delegated \
-v /tmp/bazel_output:/tmp/bazel_output:delegated \
$USER/abesim \
Expand Down Expand Up @@ -92,7 +93,7 @@ bazel test agent_based_epidemic_sim/...
```shell
docker build -t $USER/abesim .

docker run -t --rm \
docker run -t --rm -w /root/agent_based_epidemic_sim \
-v $PWD:/root/agent_based_epidemic_sim:cached \
-v /tmp/bazel_output:/tmp/bazel_output:delegated \
$USER/abesim bazel test agent_based_epidemic_sim/...
Expand Down
11 changes: 11 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'run_tests'
description: 'Run all tests.'
runs:
using: 'docker'
image: 'Dockerfile'
entrypoint: 'bazel'
args:
- 'test'
- '--test_output=errors'
- 'agent_based_epidemic_sim/...'

0 comments on commit daed591

Please sign in to comment.