Skip to content

Commit

Permalink
Switch mesh to use GitHub Actions instead of Travis for CI.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 317700292
  • Loading branch information
adarob authored and Mesh TensorFlow Team committed Jun 22, 2020
1 parent d353aa9 commit 2e4a529
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 12 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,37 @@
name: build

on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install tf-nightly mock pytest
pip install -e .[auto_mtf,transformer]
- name: Test with pytest
run: pytest
# The below step just reports the success or failure of tests as a "commit status".
# This is needed for copybara integration.
- name: Report success or failure as github status
if: always()
shell: bash
run: |
status="${{ job.status }}"
lowercase_status=$(echo $status | tr '[:upper:]' '[:lower:]')
curl -sS --request POST \
--url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' \
--data '{
"state": "'$lowercase_status'",
"target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"description": "'$status'",
"context": "github-actions/build"
}'
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -7,7 +7,7 @@ Issues](https://img.shields.io/github/issues/tensorflow/mesh.svg)](https://githu
[![Contributions
welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](CONTRIBUTING.md)
[![License](https://img.shields.io/badge/License-Apache%202.0-brightgreen.svg)](https://opensource.org/licenses/Apache-2.0)
[![Travis](https://img.shields.io/travis/tensorflow/mesh.svg)](https://travis-ci.org/tensorflow/mesh)
[![Build Status](https://github.com/tensorflow/mesh/workflows/build/badge.svg)](https://github.com/tensorflow/mesh/actions?query=workflow%3Abuild)


# Introduction
Expand Down

0 comments on commit 2e4a529

Please sign in to comment.