-
Notifications
You must be signed in to change notification settings - Fork 5
90 lines (77 loc) · 2.64 KB
/
ci_linux.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Linux Python CI
on:
push:
branches: [ "develop", "master" ]
pull_request:
branches: [ "develop", "master" ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
linux_lint:
runs-on: ubuntu-22.04 # https://github.com/actions/runner-images#available-images
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
lfs: true
- name: Setup Python and Poetry
uses: ./.github/actions/linux
with:
python-version: '3.11'
- name: Lint with mypy and flake8
env:
FINGERPRINT_KEY: ${{ secrets.FINGERPRINT_KEY }}
BRIGHTDATA_USERNAME: ${{ secrets.BRIGHTDATA_USERNAME }}
BRIGHTDATA_PASSWORD: ${{ secrets.BRIGHTDATA_PASSWORD }}
run: |
poetry run mypy pybas_automation/ tests/
poetry run flake8 pybas_automation/ tests/
linux_test:
needs: [ linux_lint ]
runs-on: ubuntu-22.04 # https://github.com/actions/runner-images#available-images
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
lfs: true
- name: Setup Python and Poetry
uses: ./.github/actions/linux
with:
python-version: '3.11'
- name: Run tests with pytest
env:
FINGERPRINT_KEY: ${{ secrets.FINGERPRINT_KEY }}
BRIGHTDATA_USERNAME: ${{ secrets.BRIGHTDATA_USERNAME }}
BRIGHTDATA_PASSWORD: ${{ secrets.BRIGHTDATA_PASSWORD }}
run: |
mkdir ./dist && touch ./dist/README.md
mkdir -p ./coverage/lcov/functional
poetry run pytest -s -vv --cov=pybas_automation --cov-report=lcov:coverage/lcov/functional/coverage.lcov tests/functional
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
# https://github.com/codecov/codecov-action#arguments
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: tests_functional
files: coverage/lcov/functional/coverage.lcov
fail_ci_if_error: false
linux_poetry_build:
needs: [ linux_lint, linux_test ]
runs-on: ubuntu-22.04 # https://github.com/actions/runner-images#available-images
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
lfs: true
- name: Setup Python and Poetry
uses: ./.github/actions/linux
with:
python-version: '3.11'
- name: Build python package with poetry
run: |
poetry check
poetry run python scripts/update_readme_links.py
poetry build