-
Notifications
You must be signed in to change notification settings - Fork 3
92 lines (89 loc) · 2.72 KB
/
ci.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
91
92
name: Workflow for Codecov Action
on: [push, pull_request]
defaults:
run:
# the default is:
# bash --noprofile --norc -eo pipefail {0}
# Helps with debugging
shell: bash --noprofile --norc -eo pipefail -ux {0}
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install python dependencies
run: pip install -r app/requirements.txt
- name: Run ATS
id: run_ats
uses: ./
with:
folders_to_exclude: node_modules
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_STATIC_TOKEN: ${{ secrets.CODECOV_STATIC_TOKEN }}
- name: "[debug] see content of generated files"
run: |
ls codecov_ats
cat codecov_ats/tests_to_run.txt
cat codecov_ats/tests_to_skip.txt
- name: Run Tests and collect coverage (if there are tests to run)
run: |
cat codecov_ats/tests_to_run.txt | xargs pytest --cov app
- name: "[debug] Running skipped tests"
run: |
cat codecov_ats/tests_to_skip.txt | xargs pytest --cov app
- name: Upload to Codecov
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
flags: smart-tests
plugins: pycoverage,compress-pycoverage
test-and-covererage:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [macos-latest, windows-latest, ubuntu-latest]
os: [macos-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
- name: Install bashcov gem
run: |
gem install bashcov
gem install simplecov
gem install simplecov-cobertura
- name: Run ATS
run: bashcov ./src/codecov_ats.sh
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_STATIC_TOKEN: ${{ secrets.CODECOV_STATIC_TOKEN }}
INPUTS_VERBOSE: true
- name: Upload to Codecov
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
flags: bash