-
Notifications
You must be signed in to change notification settings - Fork 344
44 lines (42 loc) · 1.54 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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'
- name: Install dependencies
# TODO(jesseengel): Remove `legacy-resolver` when pip dependency resolution
# is no longer broken. Currently stalls (backtracking), only on GitHub, not
# locally.
run: |
sudo apt update
sudo apt-get -y install ffmpeg
pip install -U pip
pip install -e .[data_preparation,test] --use-deprecated=legacy-resolver
- name: Test with pytest
run: pytest
- name: Lint with pylint
run: pylint ddsp
# 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"
}'