summaryrefslogtreecommitdiffstats
path: root/.github/workflows/testing_prs.yaml
blob: 11a1384bb6ac6b2bf54c9147c4045384f979d135 (plain)
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
# Copyright © 2012-2022 jrnl contributors
# License: https://www.gnu.org/licenses/gpl-3.0.html

name: Testing

on:
  push:
    branches: [ develop, release ]
    paths:
    - 'jrnl/**'
    - 'features/**'
    - 'tests/**'
    - 'poetry.lock'
    - 'pyproject.toml'
    - '.github/workflows/testing_prs.yaml'
  pull_request:
    branches: [ develop ]
    paths:
    - 'jrnl/**'
    - 'features/**'
    - 'tests/**'
    - 'poetry.lock'
    - 'pyproject.toml'
    - '.github/workflows/testing_prs.yaml'

defaults:
  run:
    shell: bash # needed to prevent Windows from using PowerShell

jobs:
  test:
    if: >
      ! contains(github.event.head_commit.message, '[ci skip]')
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        python-version: [ 3.9, '3.10', 3.11-dev ]
        os: [ ubuntu-latest, macos-latest, windows-latest ]
    steps:
      - run: git config --global core.autocrlf false
      - uses: actions/checkout@v2
      - name: Run tests
        uses: ./.github/actions/run_tests
        with:
          cache-string: ${{ secrets.CACHE_STRING }}