diff --git a/.kokoro/lint/continuous.cfg b/.github/workflows/lint.yml similarity index 55% rename from .kokoro/lint/continuous.cfg rename to .github/workflows/lint.yml index 91065304..942abc04 100644 --- a/.kokoro/lint/continuous.cfg +++ b/.github/workflows/lint.yml @@ -1,4 +1,4 @@ -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,4 +12,24 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Format: //devtools/kokoro/config/proto/build.proto \ No newline at end of file +name: Lint +on: [pull_request] + +jobs: + build: + name: Run lint + runs-on: ubuntu-latest + steps: + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: "3.10" + + - name: Install nox + run: pip install nox + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Run nox lint session + run: nox --sessions lint diff --git a/.kokoro/lint/common.cfg b/.kokoro/lint/common.cfg deleted file mode 100644 index 390f2266..00000000 --- a/.kokoro/lint/common.cfg +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Format: //devtools/kokoro/config/proto/build.proto - -# Get secrets for tests. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/cloud-sql/python-connector" - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "cloud-sql-python-connector/.kokoro/trampoline.sh" - -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "python:3.7-buster" -} - -# Tell the trampoline which tests to run. -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-sql-python-connector/.kokoro/tests/run_tests.sh" -} - -# Specify which tests to run -env_vars: { - key: "RUN_TESTS_SESSION" - value: "lint" -} \ No newline at end of file diff --git a/.kokoro/lint/periodic.cfg b/.kokoro/lint/periodic.cfg deleted file mode 100644 index 91065304..00000000 --- a/.kokoro/lint/periodic.cfg +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Format: //devtools/kokoro/config/proto/build.proto \ No newline at end of file diff --git a/.kokoro/lint/presubmit.cfg b/.kokoro/lint/presubmit.cfg deleted file mode 100644 index 91065304..00000000 --- a/.kokoro/lint/presubmit.cfg +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Format: //devtools/kokoro/config/proto/build.proto \ No newline at end of file