@@ -3,25 +3,26 @@ name: CI
33
44on :
55 push :
6- branches :
7- - main
6+ branches : [master]
87 pull_request :
8+ branches : [master]
99
1010permissions :
1111 contents : read
1212
1313jobs :
1414 pre-commit :
15+ name : Lint & Format
1516 runs-on : ubuntu-latest
1617 steps :
17- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18- - uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
18+ - uses : actions/checkout@v6
19+ - uses : actions/setup-python@v6
1920 with :
20- python-version : ' 3.12 ' # Specify a Python version explicitly
21+ python-version : ' 3.13 ' # Specify a Python version explicitly
2122 - uses : pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
2223
2324 test :
24- name : test py${{ matrix.python-version }} on ${{ matrix.os }}
25+ name : Test py${{ matrix.python-version }} on ${{ matrix.os }}
2526 runs-on : ${{ matrix.os }}
2627 defaults :
2728 run :
@@ -30,24 +31,36 @@ jobs:
3031 fail-fast : false
3132 matrix :
3233 os : ["ubuntu-latest", "macos-latest", "windows-latest"]
33- python-version : ["3.10", "3.11", "3.12", "3.13"]
34+ python-version : ["3.10", "3.11", "3.12", "3.13", "3.14" ]
3435 env :
3536 MJ_APIKEY_PUBLIC : ${{ secrets.MJ_APIKEY_PUBLIC }}
3637 MJ_APIKEY_PRIVATE : ${{ secrets.MJ_APIKEY_PRIVATE }}
3738 steps :
38- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
39+ - uses : actions/checkout@v6
3940 with :
4041 fetch-depth : 0 # Get full history with tags (required for setuptools-scm)
41- - uses : conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0
42+ - name : Set up Python ${{ matrix.python-version }}
43+ uses : conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
4244 with :
4345 python-version : ${{ matrix.python-version }}
4446 channels : defaults
4547 show-channel-urls : true
4648 environment-file : environment.yaml
49+ cache : ' pip' # Drastically speeds up CI by caching pip dependencies
4750
48- - name : Install the package
51+ - name : Install dependencies and package
4952 run : |
53+ python -m pip install --upgrade pip
5054 pip install .
5155 conda info
56+
5257 - name : Test package imports
5358 run : python -c "import mailjet_rest"
59+
60+ - name : Install test dependencies
61+ run : |
62+ python -m pip install --upgrade pip
63+ pip install pytest
64+
65+ - name : Run unit tests
66+ run : pytest tests/unit/ -v
0 commit comments