Skip to content

Commit

Permalink
add test workflow
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 416908199
  • Loading branch information
iansimon authored and Magenta Team committed Dec 16, 2021
1 parent 128d68b commit e1cbea4
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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.8.x'
- name: Install dependencies
run: |
sudo apt-get -y install libsndfile1-dev
pip install pytest
git clone --branch=main https://github.com/google-research/t5x
cd t5x
python3 -m pip install -e . -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
cd ..
pip install -e .
- name: Test with pytest
run: pytest mt3
# 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"
}'
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
install_requires=[
'absl-py',
'ddsp',
'flax',
'gin-config',
'immutabledict',
'librosa',
Expand All @@ -50,6 +51,7 @@
'scikit-learn',
'scipy',
'seqio',
't5',
'tensorflow',
'tensorflow-datasets',
],
Expand Down

0 comments on commit e1cbea4

Please sign in to comment.