ci: update
[rarfile.git] / .github / workflows / ci.yml
blob80f6d049c9641a5503eee2a26d82571386ac0dcd
2 # https://docs.github.com/en/actions
3 # https://github.com/actions
5 # https://formulae.brew.sh/
6 # https://packages.msys2.org/
9 name: CI
11 on:
12   pull_request: {}
13   push: {}
15 jobs:
17   lint:
18     name: "Lint - ${{matrix.pick.OS}} / Python ${{matrix.pick.PY}}"
19     runs-on: ${{matrix.pick.OS}}
20     strategy:
21       matrix:
22         pick:
23           - {OS: "ubuntu-latest", PY: "3.10", TOXENV: "lint,docs"}
24     steps:
25       - name: "Checkout"
26         uses: actions/checkout@v4
28       - name: "Setup Python ${{matrix.pick.PY}}"
29         uses: actions/setup-python@v4
30         with:
31           python-version: ${{matrix.pick.PY}}
33       - name: "Install build tools"
34         run: python -m pip install -r etc/requirements.build.txt --disable-pip-version-check
36       - name: "Run tox - ${{matrix.pick.TOXENV}}"
37         env:
38           TOXENV: ${{matrix.pick.TOXENV}}
39         run: |
40           python -m tox -r -- --color=yes
42   test:
43     name: "Test - ${{matrix.pick.OS}} / ${{matrix.pick.PYNAME}}"
44     runs-on: ${{matrix.pick.OS}}
45     strategy:
46       matrix:
47         pick:
48           - {OS: "ubuntu-20.04", PY: "3.7", PYNAME: "Python 3.7", TOXENV: "py37-cryptography"}
49           - {OS: "ubuntu-latest", PY: "3.8", PYNAME: "Python 3.8", TOXENV: "py38"}
50           - {OS: "ubuntu-latest", PY: "3.9", PYNAME: "Python 3.9", TOXENV: "py39-pycryptodome"}
51           - {OS: "ubuntu-latest", PY: "3.10", PYNAME: "Python 3.10", TOXENV: "py310-cryptography"}
52           - {OS: "ubuntu-latest", PY: "3.11", PYNAME: "Python 3.11", TOXENV: "py311-cryptography"}
53           - {OS: "ubuntu-latest", PY: "pypy3.9", PYNAME: "PyPy3.9", TOXENV: "pypy39-cryptography"}
54           - {OS: "ubuntu-latest", PY: "pypy3.10", PYNAME: "PyPy3.10", TOXENV: "pypy310-cryptography"}
55           - {OS: "macos-latest", PY: "3.9", PYNAME: "Python 3.9", TOXENV: "py39-pycryptodome"}
56           - {OS: "macos-latest", PY: "3.10", PYNAME: "Python 3.10", TOXENV: "py310-cryptography"}
57           - {OS: "windows-latest", PY: "3.9", PYNAME: "Python 3.9", TOXENV: "py39-cryptography" }
58           - {OS: "windows-latest", PY: "3.10", PYNAME: "Python 3.10", TOXENV: "py310-cryptography" }
59     steps:
60       - name: "Checkout"
61         uses: actions/checkout@v4
63       - name: "Setup ${{matrix.pick.PYNAME}}"
64         uses: actions/setup-python@v4
65         with:
66           python-version: ${{matrix.pick.PY}}
68       - name: "Install archivers (linux)"
69         if: ${{runner.os == 'Linux'}}
70         run: sudo -nH apt-get -qqy install unrar unar libarchive-tools p7zip-rar
72       - name: "Install archivers (macos)"
73         if: ${{runner.os == 'macOS'}}
74         run: brew install rar unar libarchive sevenzip
76       - name: "Install archivers (windows)"
77         if: ${{runner.os == 'Windows'}}
78         shell: cmd
79         run: |
80           set "PATH=c:\msys64\usr\bin;%PATH%"
81           pacman -S --noconfirm --needed unrar bsdtar p7zip
83       - name: "Install tools"
84         run: python -m pip install -r etc/requirements.build.txt --disable-pip-version-check
86       - name: "Run tox - ${{matrix.pick.TOXENV}} - (linux/macos)"
87         if: ${{runner.os == 'Linux' || runner.os == 'macOS'}}
88         env:
89           TOXENV: ${{matrix.pick.TOXENV}}
90         run: |
91           python -m tox -r -- --color=yes -n auto -v
93       - name: "Run tox - ${{matrix.pick.TOXENV}} - (windows)"
94         if: ${{runner.os == 'Windows'}}
95         env:
96           TOXENV: ${{matrix.pick.TOXENV}}
97         shell: cmd
98         run: |
99           set "PATH=%PATH%;c:\msys64\usr\bin"
100           python -m tox -r -- --color=yes -n auto -v