Skip to content

Add machometa unit #712

Add machometa unit

Add machometa unit #712

Workflow file for this run

name: tests
on:
push:
branches: [ master ]
tags-ignore: '**'
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.7.16', '3.7', '3.10']
os: [windows-latest, macos-latest, ubuntu-latest]
exclude:
- os: windows-latest
python-version: '3.7.16'
- os: ubuntu-latest
python-version: '3.7.16'
- os: macos-latest
python-version: '3.7'
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Linux-specific dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get install xclip xvfb
- name: MacOS-specific dependencies
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install libmagic
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
pip install .[all]
- name: Unit tests
if: ${{ matrix.os != 'ubuntu-latest' }}
run: |
python -m unittest discover -p test_*.py
- name: Unit tests
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
XDG_SESSION_TYPE=x11 xvfb-run python -m unittest discover -p test_*.py
coverage:
if: ${{ github.repository_owner == 'binref' }}
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
sudo apt-get install xclip xvfb
python -m pip install --upgrade pip
python -m pip install flake8 pytest pytest-cov
pip install .[all]
- name: Run tests and collect coverage
run: |
XDG_SESSION_TYPE=x11 xvfb-run pytest --cov refinery test/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true