Update CI actions and install libmagic on macOS #367
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: CI | |
on: [push, pull_request] | |
jobs: | |
tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.9, '3.10', '3.11', '3.12'] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install libmagic on macOS | |
if: runner.os == 'macOS' | |
run: brew install libmagic | |
- name: Install Poetry | |
uses: abatilo/actions-poetry@v2.0.0 | |
with: | |
poetry-version: 1.7.1 | |
- name: Install Dependencies | |
run: poetry install | |
- name: Run Tests | |
run: poetry run pytest --cov=iscc_sdk --cov-report=xml -v tests | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'python' ] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v2 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 |