summaryrefslogtreecommitdiff
path: root/.github/workflows/test.yml
blob: e346f04fb7e1141a84007ae7b635c19f831a56a8 (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
name: Test

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: ["ubuntu-20.04", "windows-2022", "macos-11"]
        python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "pypy-3.7"]
    env:
      BABEL_CLDR_NO_DOWNLOAD_PROGRESS: "1"
      BABEL_CLDR_QUIET: "1"
    steps:
    - uses: actions/checkout@v3
    - uses: actions/cache@v2
      with:
        path: cldr
        key: cldr-${{ hashFiles('scripts/*cldr*') }}
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v3
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip setuptools wheel
        python -m pip install tox tox-gh-actions==2.1.0
    - name: Run test via Tox
      run: tox --skip-missing-interpreters
      env:
        COVERAGE_XML_PATH: ${{ runner.temp }}
    - uses: codecov/codecov-action@v2
      with:
        directory: ${{ runner.temp }}