-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1.04 KB
/
python_lint_test.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
# Workflow to run linting and tests on python code
name: Python Workflow
on:
pull_request:
paths:
- reusable_workflows/**
- requirements.txt
merge_group:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
python-test-and-lint:
name: Test and Lint python code
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Python Setup
uses: ./.github/workflows/python-setup
- name: Run tests
run: pytest reusable_workflows/
- name: Run linter
run: |
mypy reusable_workflows/
black reusable_workflows/
flake8 reusable_workflows/
- name: Create GitHub App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.CLA_BOT_APP_ID }}
private-key: ${{ secrets.CLA_BOT_PRIVATE_KEY }}
- name: Run all tests
run: pytest --integration-tests reusable_workflows/
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}