-
Notifications
You must be signed in to change notification settings - Fork 35
86 lines (72 loc) · 2.26 KB
/
test.yaml
File metadata and controls
86 lines (72 loc) · 2.26 KB
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
name: Test project
on:
pull_request:
branches:
- "main"
push:
branches:
- "main"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
codeql:
name: Perform CodeQL analysis
if: ${{ github.repository == 'livepeer/comfystream' }}
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: typescript,javascript,python
config-file: ./.github/codeql-config.yaml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
editorconfig:
name: Run editorconfig checker
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
# Check https://github.com/livepeer/go-livepeer/pull/1891
# for ref value discussion
ref: ${{ github.event.pull_request.head.sha }}
- name: Install editorconfig-checker
uses: editorconfig-checker/action-editorconfig-checker@main
- name: Run editorconfig checker against the repo
if: false
# disabled editorconfig lint rule for now
run: editorconfig-checker --format github-actions
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
# Check https://github.com/livepeer/go-livepeer/pull/1891
# for ref value discussion
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[dev]'
- name: Run tests
run: pytest --cov --verbose --showlocals
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CI_CODECOV_TOKEN }}
name: ${{ github.event.repository.name }}