Skip to content

Bump ossf/scorecard-action from 2.3.1 to 2.3.3 #236

Bump ossf/scorecard-action from 2.3.1 to 2.3.3

Bump ossf/scorecard-action from 2.3.1 to 2.3.3 #236

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
PYTHONUNBUFFERED: "1"
PYTHONHASHSEED: "1"
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: True
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
defaults:
run:
shell: bash
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit
- name: Check out repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@93ada01c735cc8a383ce0ce2ae205a21c415379b # v1.3.4
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Activate env
run: |
source $VENV
- name: Run ruff
run: |
poetry run ruff check --output-format=github .
poetry run ruff format . --diff
- name: Run mypy
run: |
poetry run mypy .
- name: Run tests
run: |
poetry run pytest --cov=obscure_stats --cov-report term --cov-report xml:coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
if: matrix.python-version == '3.11'
with:
flags: smart-tests
verbose: true
file: ./coverage.xml
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}