-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (55 loc) · 1.46 KB
/
Copy pathci.yml
File metadata and controls
59 lines (55 loc) · 1.46 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
name: ci
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
test:
name: py${{ matrix.python }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python: ["3.8", "3.12"]
exclude:
- os: macos-latest
python: "3.8"
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- run: python -m pip install --upgrade pip
- run: pip install -e ".[dev]"
- name: Tests
run: pytest -q
- name: The CLI runs
run: |
substack --version
substack --help
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- run: pip install ruff
- run: ruff check .
no-credentials:
name: no credentials committed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Look for session cookies
run: |
if git grep -nE 's%3A[A-Za-z0-9_.%-]{30,}' -- . ':!*.yml'; then
echo "A session cookie appears to be committed."
exit 1
fi
if git ls-files | grep -qx '.substack.json'; then
echo ".substack.json is tracked and holds credentials."
exit 1
fi