-
Notifications
You must be signed in to change notification settings - Fork 1.5k
46 lines (44 loc) · 1.2 KB
/
lint.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
45
46
on:
pull_request:
branches:
- main
# Trigger workflow on GitHub merge queue events
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#merge_group
merge_group:
types: [checks_requested]
name: lint
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# Use a fetch-depth of 2 to avoid error `fatal: origin/main...HEAD: no merge base`
# See https://github.com/googleapis/google-cloud-python/issues/12013
# and https://github.com/actions/checkout#checkout-head.
with:
fetch-depth: 2
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
- name: Run lint
env:
BUILD_TYPE: presubmit
TEST_TYPE: lint
PY_VERSION: "3.10"
run: |
ci/run_conditional_tests.sh
- name: Run lint_setup_py
env:
BUILD_TYPE: presubmit
TEST_TYPE: lint_setup_py
PY_VERSION: "3.10"
run: |
ci/run_conditional_tests.sh