Skip to content

feat(ci): add tests using github actions #6

feat(ci): add tests using github actions

feat(ci): add tests using github actions #6

Workflow file for this run

# 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.
# 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.
name: Extension Tests
on:
pull_request:
# Declare default permissions as read only.
permissions: read-all
jobs:
lint:
name: Run lint
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: "3.11"
- name: Checkout code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Requirements
working-directory: extension-service
run: pip install -r requirements.txt -r requirements-text.txt
- name: Run lints
working-directory: extension-service
run: |
black --check .
isort --check .
mypy .
- name: Run tests
working-directory: extension-service
run: pytest .