-
Notifications
You must be signed in to change notification settings - Fork 34
60 lines (50 loc) · 1.46 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
name: CI
on:
pull_request:
branches: [ master ]
workflow_dispatch: ~
jobs:
validate:
runs-on: ubuntu-latest
outputs:
commit: ${{ steps.validate.outputs.commit }}
steps:
- uses: actions/checkout@v4
- name: validate
id: validate
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: |
python3 ./scripts/validate_commit.py
tests:
runs-on: windows-latest
needs: validate
steps:
- uses: actions/checkout@v4
if: "${{ !startsWith(needs.validate.outputs.commit, 'chore:') }}"
- name: setup-python
if: "${{ !startsWith(needs.validate.outputs.commit, 'chore:') }}"
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: install
if: "${{ !startsWith(needs.validate.outputs.commit, 'chore:') }}"
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: lint
if: "${{ !startsWith(needs.validate.outputs.commit, 'chore:') }}"
run: |
flake8
- name: test
if: "${{ !startsWith(needs.validate.outputs.commit, 'chore:') }}"
env:
A4KSUBTITLES_SUBDL_APIKEY: ${{ secrets.A4KSUBTITLES_SUBDL_APIKEY }}
run: |
coverage run -m pytest -v -s --log-level=DEBUG
- name: coverage
if: "${{ !startsWith(needs.validate.outputs.commit, 'chore:') }}"
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
coveralls