name: Tests on: [push] jobs: build: strategy: matrix: os: [ubuntu-18.04] python-version: [2.7, 3.6, 3.7, 3.8, 3.9, 3.10.0] include: - os: macos-10.15 python-version: 3.10.0 - os: windows-2019 python-version: 3.10.0 architecture: 'x86' - os: windows-2019 python-version: 3.10.0 architecture: 'x64' runs-on: ${{ matrix.os }} steps: - name: Install Linux dependencies if: runner.os == 'Linux' run: | sudo apt-get update sudo apt-get install -y libdmtx0a python-opencv - name: Install macOS dependencies if: runner.os == 'macOS' run: | brew update brew install libdmtx - name: Checkout uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.architecture }} - name: Install dependencies run: | python -m pip install --upgrade pip==20.3.4 pip install -r requirements-test.txt - name: Download 32-bit DLLs if: ${{ runner.os == 'Windows' && matrix.architecture == 'x86' }} run: | cd pylibdmtx curl --location --remote-name-all "https://github.com/NaturalHistoryMuseum/barcode-reader-dlls/releases/download/0.1/libdmtx-32.dll" cd .. - name: Download 64-bit DLLs if: ${{ runner.os == 'Windows' && matrix.architecture == 'x64' }} run: | cd pylibdmtx curl --location --remote-name-all "https://github.com/NaturalHistoryMuseum/barcode-reader-dlls/releases/download/0.1/libdmtx-64.dll" cd .. - name: Run tests run: pytest --verbose --cov=pylibdmtx pylibdmtx - name: Upload coverage if: ${{ matrix.python-version == '3.10.0' && runner.os == 'Linux' }} run: | pip install coveralls>=3.2.0 coveralls --service=github env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}