-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.08 KB
/
presubmit.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: Presubmit checks
permissions:
contents: read
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Cancel previous
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
with: # Needed for git diff to work. (get_changed_files)
fetch-depth: 0
- run: |
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master
- name: Setup python environment
uses: actions/setup-python@v3
with:
python-version: 3.8
cache: pip
cache-dependency-path: |
infra/ci/requirements.txt
infra/build/functions/requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r infra/ci/requirements.txt
pip install -r infra/build/functions/requirements.txt
- name: Run presubmit checks
run: python infra/presubmit.py