File: ci.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 (166 lines) | stat: -rw-r--r-- 4,287 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: CI

on:
  push:
    branches: ["master"]
    tags:
    - "*"
  pull_request:
    branches: ["master"]
  workflow_dispatch:

jobs:
  event_file:
    name: "Event File"
    runs-on: ubuntu-latest
    steps:
    - name: Upload
      uses: actions/upload-artifact@v4
      with:
        name: Event File
        path: ${{ github.event_path }}

  test-linux:
    name: "Test Ubuntu"
    uses: "./.github/workflows/test-os.yml"
    with:
      os: '["ubuntu-24.04"]'
      # alive Python versions
      python-version: '["3.9", "3.10", "3.11", "3.12", "3.13"]'
      # EOL Python versions
      include: >
        [
          {"os": "ubuntu-22.04", "python-version": "3.8"},
        ]

  test-win:
    name: "Test Windows"
    uses: "./.github/workflows/test-os.yml"
    with:
      os: '["windows-2025"]'
      # alive Python versions
      python-version: '["3.9", "3.10", "3.11", "3.12", "3.13"]'
      # EOL Python versions
      include: >
        [
          {"os": "windows-2019", "python-version": "3.6"},
          {"os": "windows-2019", "python-version": "3.7"},
          {"os": "windows-2022", "python-version": "3.8"},
        ]

  test-mac:
    name: "Test macOS"
    uses: "./.github/workflows/test-os.yml"
    with:
      os: '["macos-15"]'
      # alive Python versions
      python-version: '["3.9", "3.10", "3.11", "3.12", "3.13"]'
      # EOL Python versions
      include: >
        [
          {"os": "macos-13", "python-version": "3.6"},
          {"os": "macos-13", "python-version": "3.7"},
          {"os": "macos-14", "python-version": "3.8"},
        ]

  coverage-lint:
    name: "Coverage & Lint"
    needs: ["test-linux", "test-win", "test-mac"]
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Set up Python 3.x
      uses: actions/setup-python@v4
      with:
        python-version: 3.x
    - name: Setup locales
      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 lxml flake8 pytest coverage
    - name: Lint with flake8
      run: |
        # The GitHub editor is 127 chars wide
        flake8 . --count --max-complexity=10 --max-line-length=127 --show-source --statistics
    - name: Test and coverage
      run: |
        coverage run -m pytest
        bash <(curl -s https://codecov.io/bash)

  package-build:
    name: "Build Package"
    needs: coverage-lint
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Set up Python 3.x
      uses: actions/setup-python@v4
      with:
        python-version: 3.x
    - name: Build packages
      run: |
        # Build packages
        echo "::group::build"
        pip install build
        python -m build
        echo "::endgroup::"

        echo "::group::dist/"
        ls -lah dist/
        echo "::endgroup::"

        echo "::group::tar.gz"
        tar -tzvf dist/junitparser-*.tar.gz
        echo "::endgroup::"

        echo "::group::wheel"
        unzip -l dist/junitparser-*.whl
        echo "::endgroup::"

        echo "::group::wheel metadata"
        unzip -p dist/junitparser-*.whl junitparser-*.dist-info/METADATA
        echo "::endgroup::"
    - name: Upload
      uses: actions/upload-artifact@v4
      with:
        name: Binaries
        path: dist/*

  test-whl:
    name: "Test whl"
    needs: package-build
    uses: "./.github/workflows/test-whl.yml"
    with:
      os: '["ubuntu-24.04"]'
      # alive Python versions
      python-version: '["3.9", "3.10", "3.11", "3.12", "3.13"]'
      # EOL Python versions
      include: >
        [
          {"os": "ubuntu-22.04", "python-version": "3.8"},
        ]

  package-publish:
    name: "Publish Package"
    needs: test-whl
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Download Binaries
      uses: actions/download-artifact@v4
      with:
        name: Binaries
        path: dist/
    - name: Inspect binaries
      run: |
        ls -lah dist/
    - name: Publish to pypi
      if: startsWith(github.ref, 'refs/tags')
      uses: pypa/gh-action-pypi-publish@release/v1
      with:
        user: __token__
        password: ${{ secrets.pypi_password }}