|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: |
| 8 | + |
| 9 | +jobs: |
| 10 | + lint: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v4 |
| 14 | + - uses: actions/setup-python@v5 |
| 15 | + with: |
| 16 | + cache: pip |
| 17 | + cache-dependency-path: | |
| 18 | + dev-requirements.txt |
| 19 | + fluent.syntax/setup.py |
| 20 | + fluent.runtime/setup.py |
| 21 | + - run: python -m pip install -r dev-requirements.txt |
| 22 | + - run: python -m pip install ./fluent.syntax ./fluent.runtime |
| 23 | + - run: python -m flake8 |
| 24 | + - run: python -m mypy fluent.syntax/fluent fluent.runtime/fluent |
| 25 | + test: |
| 26 | + runs-on: ubuntu-latest |
| 27 | + strategy: |
| 28 | + matrix: |
| 29 | + python-version: [3.7, 3.8, 3.9, "3.10", 3.11, 3.12, pypy3.9, pypy3.10] |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v4 |
| 32 | + - uses: actions/setup-python@v5 |
| 33 | + with: |
| 34 | + python-version: ${{ matrix.python-version }} |
| 35 | + cache: pip |
| 36 | + cache-dependency-path: | |
| 37 | + fluent.syntax/setup.py |
| 38 | + fluent.runtime/setup.py |
| 39 | + - run: python -m pip install ./fluent.syntax ./fluent.runtime |
| 40 | + - run: python -m unittest discover -s fluent.syntax |
| 41 | + - run: python -m unittest discover -s fluent.runtime |
| 42 | + |
| 43 | + # Test compatibility with the oldest Python version we claim to support, |
| 44 | + # and for fluent.runtime's compatibility with a range of fluent.syntax versions. |
| 45 | + compatibility: |
| 46 | + runs-on: ubuntu-20.04 # https://github.com/actions/setup-python/issues/544 |
| 47 | + strategy: |
| 48 | + matrix: |
| 49 | + fluent-syntax: |
| 50 | + - ./fluent.syntax |
| 51 | + - fluent.syntax==0.19.0 |
| 52 | + - fluent.syntax==0.18.1 six |
| 53 | + - fluent.syntax==0.17.0 six |
| 54 | + steps: |
| 55 | + - uses: actions/checkout@v3 |
| 56 | + - uses: actions/setup-python@v4 |
| 57 | + with: |
| 58 | + python-version: 3.6 |
| 59 | + - run: python -m pip install ${{ matrix.fluent-syntax }} |
| 60 | + - run: python -m pip install ./fluent.runtime |
| 61 | + - run: python -m unittest discover -s fluent.runtime |
0 commit comments