forked from starenka/mailjetv3
-
Notifications
You must be signed in to change notification settings - Fork 39
86 lines (76 loc) · 2.48 KB
/
Copy pathcommit_checks.yaml
File metadata and controls
86 lines (76 loc) · 2.48 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: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
pre-commit:
name: Lint & Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.13'
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
zizmor:
name: GitHub Actions Security Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Install zizmor
run: pip install zizmor
- name: Run zizmor
run: zizmor .github/workflows/
test:
name: Test py${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
env:
MJ_APIKEY_PUBLIC: ${{ secrets.MJ_APIKEY_PUBLIC }}
MJ_APIKEY_PRIVATE: ${{ secrets.MJ_APIKEY_PRIVATE }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1
with:
python-version: ${{ matrix.python-version }}
channels: defaults
show-channel-urls: true
environment-file: environment.yaml
- name: Install dependencies and package
run: |
python -m pip install --upgrade pip
pip install .
conda info
- name: Test package imports
run: python -c "import mailjet_rest"
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install pytest hypothesis responses pytest-cov
- name: Run unit tests
run: pytest -v tests/unit --cov=mailjet_rest --cov-report=xml
- name: Upload Coverage
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
file: ./coverage.xml
fail_ci_if_error: false