2 # https://docs.github.com/en/actions
3 # https://github.com/actions
15 name: "Lint - Ubuntu ${{matrix.pick.OS}} / Python ${{matrix.pick.PY}}"
16 runs-on: ubuntu-${{matrix.pick.OS}}
20 - {OS: "20.04", PY: "3.8", TOXENV: "lint,docs"}
23 uses: actions/checkout@v2
25 - name: "Setup Python ${{matrix.pick.PY}}"
26 uses: actions/setup-python@v2
28 python-version: ${{matrix.pick.PY}}
32 python -m pip install tox wheel
34 - name: "Run tox - ${{matrix.pick.TOXENV}}"
36 TOXENV: ${{matrix.pick.TOXENV}}
38 python -m tox -r -- --color=yes
41 name: "Test - Ubuntu ${{matrix.pick.OS}} / ${{matrix.pick.PYNAME}}"
42 runs-on: ubuntu-${{matrix.pick.OS}}
46 - {OS: "18.04", PY: "pypy3", PYNAME: "PyPy3", TOXENV: "pypy3"}
47 - {OS: "16.04", PY: "3.6", PYNAME: "Python 3.6", TOXENV: "py36-pycryptodome"}
48 - {OS: "18.04", PY: "3.7", PYNAME: "Python 3.7", TOXENV: "py37-cryptography"}
49 - {OS: "20.04", PY: "3.8", PYNAME: "Python 3.8", TOXENV: "py38-cryptography"}
50 - {OS: "20.04", PY: "3.9", PYNAME: "Python 3.9", TOXENV: "py39"}
53 uses: actions/checkout@v2
55 - name: "Setup ${{matrix.pick.PYNAME}}"
56 uses: actions/setup-python@v2
58 python-version: ${{matrix.pick.PY}}
60 - name: "Install archivers"
61 run: sudo -nH apt-get -qqy install unrar unar libarchive-tools
66 python -m pip install tox wheel
68 - name: "Run tox - ${{matrix.pick.TOXENV}}"
70 TOXENV: ${{matrix.pick.TOXENV}}
72 python -m tox -r -- --color=yes -n auto
75 name: "Test - MacOS ${{matrix.pick.OS}} / Python ${{matrix.pick.PY}}"
76 runs-on: macos-${{matrix.pick.OS}}
80 - {OS: "10.15", PY: "3.8", TOXENV: "py38-cryptography", DL_UNRAR: false, DL_UNAR: false}
83 uses: actions/checkout@v2
85 - name: "Setup Python ${{matrix.pick.PY}}"
86 uses: actions/setup-python@v2
88 python-version: ${{matrix.pick.PY}}
90 - name: "Install archivers"
92 brew install unrar unar libarchive
94 echo "::add-path::${GITHUB_WORKSPACE}/bin"
96 - name: "Download unrar"
97 if: matrix.pick.DL_UNRAR
99 curl -sS -o "rarosx.tgz" "https://www.rarlab.com/rar/rarosx-5.9.1.tar.gz"
100 tar xvf "rarosx.tgz" "rar/unrar"
102 - name: "Download unar"
103 if: matrix.pick.DL_UNAR
105 curl -sS -o "unarMac.zip" "https://cdn.theunarchiver.com/downloads/unarMac.zip"
106 unzip "unarMac.zip" "unar"
107 install -m 755 unar ./bin/
110 - name: "Install tox"
112 python -m pip install tox wheel
114 - name: "Run tox - ${{matrix.pick.TOXENV}}"
116 TOXENV: ${{matrix.pick.TOXENV}}
118 python -m tox -r -- --color=yes -n auto
121 name: "Test - Windows ${{matrix.pick.OS}} / Python ${{matrix.pick.PY}}"
122 runs-on: windows-${{matrix.pick.OS}}
126 - {OS: "2016", PY: "3.6", TOXENV: "py36", DL_UNRAR: false, DL_UNAR: false}
127 - {OS: "2019", PY: "3.8", TOXENV: "py38-cryptography", DL_UNRAR: false, DL_UNAR: false}
130 uses: actions/checkout@v2
132 - name: "Setup Python ${{matrix.pick.PY}}"
133 uses: actions/setup-python@v2
135 python-version: ${{matrix.pick.PY}}
140 echo "temp add MSYS to PATH"
141 echo ::set-env name=OLDP::%PATH%
142 echo ::add-path::C:\msys64\usr\bin
144 - name: "Install unrar, bsdtar"
147 pacman -S --noconfirm --needed unrar bsdtar
149 install -m 755 /c/msys64/usr/bin/unrar.exe bin/
150 install -m 755 /c/msys64/usr/bin/bsdtar.exe bin/
152 echo "::add-path::${OLDP}"
154 - name: "Download unrar"
155 if: matrix.pick.DL_UNRAR
158 curl -sS -o "unrarw32.exe" "https://www.rarlab.com/rar/unrarw32.exe"
160 echo "::add-path::${GITHUB_WORKSPACE}\\rar"
162 # need at least unar >= 1.10
163 - name: "Download unar"
164 if: matrix.pick.DL_UNAR
167 curl -sS -o "unarWindows.zip" "https://cdn.theunarchiver.com/downloads/unarWindows.zip"
168 unzip -q -d unar "unarWindows.zip"
169 echo "::add-path::${GITHUB_WORKSPACE}\\unar"
171 - name: "Install tox"
174 python -m pip install tox wheel
176 - name: "Run tox - ${{matrix.pick.TOXENV}}"
179 TOXENV: ${{matrix.pick.TOXENV}}
181 python -m tox -r -- --color=yes -n auto