-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (63 loc) · 1.65 KB
/
main.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
name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 20 * * *' # every day at 20:00 UTC
env:
USER_AGENT: "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0"
jobs:
test-links-valid:
runs-on: ubuntu-latest
container:
image: lycheeverse/lychee:latest
env:
GITHUB_TOKEN: $LYCHEE_GITHUB_TOKEN
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check external links using lychee
run: |
lychee --verbose --timeout 45 --user-agent="$USER_AGENT" README.md
test-links-sorted:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v1
id: cache
env:
cache-name: cache-pip-poetry
with:
path: ~/.cache
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: "3.9"
- name: CI setup
run: |
make ci_setup
- name: Install dependencies
run: |
make install
if: steps.cache.outputs.cache-hit != 'true'
- name: Black (code formatting) check
run: |
make check_black
- name: Mypy (typecheck) check
run: |
make check_mypy
- name: Flake8 (lint) check
run: |
make lint
- name: isort (imports) check
run: |
make check_isort
- name: Test if links are sorted in README.md
run: |
make test_not_external