Skip to content

CM-22319 - Run secrets scanning asynchronously using polling mechanism #237

CM-22319 - Run secrets scanning asynchronously using polling mechanism

CM-22319 - Run secrets scanning asynchronously using polling mechanism #237

Workflow file for this run

name: Unit Tests on all supported Python versions and OS
on:
pull_request:
branches:
- main
permissions:
contents: read
jobs:
unit_tests:
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
runs-on: ${{matrix.os}}
defaults:
run:
shell: bash
steps:
- name: Run Cimon
if: matrix.os == 'ubuntu-latest'
uses: cycodelabs/cimon-action@v0
with:
client-id: ${{ secrets.CIMON_CLIENT_ID }}
secret: ${{ secrets.CIMON_SECRET }}
prevent: true
allowed-hosts: >
files.pythonhosted.org
install.python-poetry.org
pypi.org
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Load cached Poetry setup
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-${{ matrix.os }}-0 # increment to reset cache
- name: Setup Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
version: 1.5.1
- name: Add Poetry to PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install
- name: Run Tests
run: poetry run pytest