This repository has been archived by the owner on Jan 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch mesh to use GitHub Actions instead of Travis for CI.
PiperOrigin-RevId: 317700292
- Loading branch information
Showing
3 changed files
with
38 additions
and
12 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,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" | ||
}' |
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