File: ci.yml

package info (click to toggle)
python-rarfile 4.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,308 kB
  • sloc: python: 4,180; makefile: 201; sh: 88; awk: 14
file content (117 lines) | stat: -rw-r--r-- 3,862 bytes parent folder | download | duplicates (2)
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
#
# https://docs.github.com/en/actions
# https://github.com/actions
#
# https://formulae.brew.sh/
# https://packages.msys2.org/
#

name: CI

on:
  pull_request: {}
  push: {}

jobs:

  lint:
    name: "Lint - ${{matrix.pick.OS}} / Python ${{matrix.pick.PY}}"
    runs-on: ${{matrix.pick.OS}}
    strategy:
      matrix:
        pick:
          - {OS: "ubuntu-latest", PY: "3.10", TOXENV: "lint,docs"}
    steps:
      - name: "Checkout"
        uses: actions/checkout@v4

      - name: "Setup Python ${{matrix.pick.PY}}"
        uses: actions/setup-python@v5
        with:
          python-version: ${{matrix.pick.PY}}

      - name: "Install build tools"
        run: python -m pip install -r etc/requirements.build.txt --disable-pip-version-check

      - name: "Run tox - ${{matrix.pick.TOXENV}}"
        env:
          TOXENV: ${{matrix.pick.TOXENV}}
        run: |
          python -m tox -r -- --color=yes

  test:
    name: "Test - ${{matrix.pick.OS}} / ${{matrix.pick.PYNAME}}"
    runs-on: ${{matrix.pick.OS}}
    strategy:
      matrix:
        pick:
          - {OS: "ubuntu-latest", PY: "3.8", PYNAME: "Python 3.8", TOXENV: "py38"}
          - {OS: "ubuntu-latest", PY: "3.9", PYNAME: "Python 3.9", TOXENV: "py39-pycryptodome"}
          - {OS: "ubuntu-latest", PY: "3.10", PYNAME: "Python 3.10", TOXENV: "py310-cryptography"}
          - {OS: "ubuntu-latest", PY: "3.11", PYNAME: "Python 3.11", TOXENV: "py311-cryptography"}
          - {OS: "ubuntu-latest", PY: "3.12", PYNAME: "Python 3.12", TOXENV: "py312-cryptography"}
          - {OS: "ubuntu-latest", PY: "pypy3.9", PYNAME: "PyPy3.9", TOXENV: "pypy39-cryptography"}
          - {OS: "ubuntu-latest", PY: "pypy3.10", PYNAME: "PyPy3.10", TOXENV: "pypy310-cryptography"}
          - {OS: "macos-latest", PY: "3.9", PYNAME: "Python 3.9", TOXENV: "py39-pycryptodome"}
          - {OS: "macos-latest", PY: "3.10", PYNAME: "Python 3.10", TOXENV: "py310-cryptography"}
          - {OS: "windows-latest", PY: "3.9", PYNAME: "Python 3.9", TOXENV: "py39-cryptography" }
          - {OS: "windows-latest", PY: "3.10", PYNAME: "Python 3.10", TOXENV: "py310-cryptography" }
    steps:
      - name: "Checkout"
        uses: actions/checkout@v4

      - name: "Setup ${{matrix.pick.PYNAME}}"
        uses: actions/setup-python@v5
        with:
          python-version: ${{matrix.pick.PY}}

      - name: "Install archivers (linux)"
        if: ${{runner.os == 'Linux'}}
        run: |
          sudo -nH apt-get -qqy install unrar unar libarchive-tools p7zip-rar
          unrar
          unar -h
          bsdtar -h
          7z i

      - name: "Install archivers (macos)"
        if: ${{runner.os == 'macOS'}}
        run: |
          brew install rar unar libarchive sevenzip
          unrar
          unar -h
          bsdtar -h
          7z i
          7zz i

      - name: "Install archivers (windows)"
        if: ${{runner.os == 'Windows'}}
        shell: cmd
        run: |
          set "PATH=c:\msys64\usr\bin;%PATH%"
          pacman -S --noconfirm --needed bsdtar p7zip
          curl -sS -o unrarw64.exe https://www.rarlab.com/rar/unrarw64.exe
          7z x unrarw64.exe
          unrar
          bsdtar -h
          7z i

      - name: "Install tools"
        run: python -m pip install -r etc/requirements.build.txt --disable-pip-version-check

      - name: "Run tox - ${{matrix.pick.TOXENV}} - (linux/macos)"
        if: ${{runner.os == 'Linux' || runner.os == 'macOS'}}
        env:
          TOXENV: ${{matrix.pick.TOXENV}}
        run: |
          python -m tox -r -- --color=yes -n auto -v

      - name: "Run tox - ${{matrix.pick.TOXENV}} - (windows)"
        if: ${{runner.os == 'Windows'}}
        env:
          TOXENV: ${{matrix.pick.TOXENV}}
        shell: cmd
        run: |
          set "PATH=%PATH%;c:\msys64\usr\bin"
          python -m tox -r -- --color=yes -n auto -v