CM-37862 - Integrate Sentry #391
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.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@v4 | |
with: | |
fetch-depth: 0 | |
- 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 }}-1 # 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 executable test | |
run: | | |
poetry run pyinstaller pyinstaller.spec | |
./dist/cycode-cli version | |
- name: Run pytest | |
run: poetry run pytest |