File: test-os.yml

package info (click to toggle)
junitparser 4.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 324 kB
  • sloc: python: 2,166; xml: 81; makefile: 14
file content (56 lines) | stat: -rw-r--r-- 1,536 bytes parent folder | download
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
name: Test OS

on:
  workflow_call:
    inputs:
      os:
        required: true
        type: string
      python-version:
        required: true
        type: string
      include:
        required: true
        type: string

jobs:
  test:
    name: Test (python-${{ matrix.python-version }}, ${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: ${{ fromJson(inputs.os) }}
        python-version: ${{ fromJson(inputs.python-version) }}
        include: ${{ fromJson(inputs.include) }}

    steps:
    - uses: actions/checkout@v3
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python-version }}
    - name: Setup locales
      if: startsWith(matrix.os, 'ubuntu')
      run: |
        sudo locale-gen en_US.UTF-8
        sudo locale-gen de_DE.UTF-8
        sudo update-locale
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install pytest
      shell: bash
    - name: Test
      run: |
        pytest --junit-xml=test-results-py${{ matrix.python-version }}-xml.xml
    - name: Test with lxml
      run: |
        pip install lxml
        pytest --junit-xml=test-results-py${{ matrix.python-version }}-lxml.xml
    - name: Upload Test Results
      if: always()
      uses: actions/upload-artifact@v4
      with:
        name: Test Results (Python ${{ matrix.python-version }}, ${{ matrix.os }})
        path: test-results-py*-*.xml