forked from apache/incubator-devlake-playground
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (36 loc) · 1.02 KB
/
python-check.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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python check
on:
push:
branches: [ "main", "ci/*" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.12.1
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Cache the virtualenv
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: |
poetry install
- name: Lint
run: |
poetry run pylint playground tests
- name: Tests
run: |
poetry run pytest tests