doc: add readthedocs config
[rarfile.git] / .github / workflows / ci.yml
blob3269d58383f960c92e3a7e094e748f9fbb75b470
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@v5
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-latest", PY: "3.8", PYNAME: "Python 3.8", TOXENV: "py38"}
49           - {OS: "ubuntu-latest", PY: "3.9", PYNAME: "Python 3.9", TOXENV: "py39-pycryptodome"}
50           - {OS: "ubuntu-latest", PY: "3.10", PYNAME: "Python 3.10", TOXENV: "py310-cryptography"}
51           - {OS: "ubuntu-latest", PY: "3.11", PYNAME: "Python 3.11", TOXENV: "py311-cryptography"}
52           - {OS: "ubuntu-latest", PY: "3.12", PYNAME: "Python 3.12", TOXENV: "py312-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@v5
65         with:
66           python-version: ${{matrix.pick.PY}}
68       - name: "Install archivers (linux)"
69         if: ${{runner.os == 'Linux'}}
70         run: |
71           sudo -nH apt-get -qqy install unrar unar libarchive-tools p7zip-rar
72           unrar
73           unar -h
74           bsdtar -h
75           7z i
77       - name: "Install archivers (macos)"
78         if: ${{runner.os == 'macOS'}}
79         run: |
80           brew install rar unar libarchive sevenzip
81           unrar
82           unar -h
83           bsdtar -h
84           7z i
85           7zz i
87       - name: "Install archivers (windows)"
88         if: ${{runner.os == 'Windows'}}
89         shell: cmd
90         run: |
91           set "PATH=c:\msys64\usr\bin;%PATH%"
92           pacman -S --noconfirm --needed bsdtar p7zip
93           curl -sS -o unrarw64.exe https://www.rarlab.com/rar/unrarw64.exe
94           7z x unrarw64.exe
95           unrar
96           bsdtar -h
97           7z i
99       - name: "Install tools"
100         run: python -m pip install -r etc/requirements.build.txt --disable-pip-version-check
102       - name: "Run tox - ${{matrix.pick.TOXENV}} - (linux/macos)"
103         if: ${{runner.os == 'Linux' || runner.os == 'macOS'}}
104         env:
105           TOXENV: ${{matrix.pick.TOXENV}}
106         run: |
107           python -m tox -r -- --color=yes -n auto -v
109       - name: "Run tox - ${{matrix.pick.TOXENV}} - (windows)"
110         if: ${{runner.os == 'Windows'}}
111         env:
112           TOXENV: ${{matrix.pick.TOXENV}}
113         shell: cmd
114         run: |
115           set "PATH=%PATH%;c:\msys64\usr\bin"
116           python -m tox -r -- --color=yes -n auto -v