Skip to content

Merge pull request #131 from fossology/chore/introduce-ruff #78

Merge pull request #131 from fossology/chore/introduce-ruff

Merge pull request #131 from fossology/chore/introduce-ruff #78

Workflow file for this run

name: CLI Tests
on:
push:
paths:
- '**cli**'
pull_request:
paths:
- '**cli**'
jobs:
test-latest:
name: foss_cli tests (latest Fossology)
runs-on: ubuntu-latest
container:
image: python:3.11-slim
volumes:
- /tmp:/tmp
services:
fossology:
image: fossology/fossology:latest
ports:
- 8081:80
volumes:
- /tmp:/tmp
steps:
- uses: actions/checkout@v1
- name: Install host dependencies
run: |
apt-get -qq update
apt-get install -qq gcc git nmap xz-utils
rm -rf /var/lib/apt/lists/*
- name: Install Python dependencies
run: |
pip install poetry
poetry install --with=dev
- name: Install files in shared volume
run: |
tar xJf tests/files/base-files_11.tar.xz -C /tmp
- name: Check services
run: nmap fossology -p 80
- name: Run tests
run: |
poetry run coverage run --source=fossology -m pytest tests/test_foss_cli*.py
poetry run coverage report -m
continue-on-error: true