1name: Presubmit checks 2 3on: 4 pull_request: 5 branches: 6 - master 7 8jobs: 9 build: 10 runs-on: ubuntu-latest 11 12 steps: 13 - name: Cancel previous 14 uses: styfle/cancel-workflow-action@0.8.0 15 with: 16 access_token: ${{ github.token }} 17 18 - uses: actions/checkout@v2 19 - run: | # Needed for git diff to work. 20 git fetch origin master --depth 1 21 git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master 22 23 - name: Setup python environment 24 uses: actions/setup-python@v2 25 with: 26 python-version: 3.8 27 28 - name: Install dependencies 29 run: | 30 python -m pip install --upgrade pip 31 pip install -r infra/ci/requirements.txt 32 pip install -r infra/build/functions/requirements.txt 33 34 - name: Run presubmit checks 35 run: python infra/presubmit.py 36