Skip to content

Update release.yml

Update release.yml #37

name: Continuous Integration
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- name: Check out the commit
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ~${{ matrix.version }}
- name: Install development dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python3 -m pip install tomli
- name: Test install
run: python3 -m pip install .[tests]
- name: Test with pytest
run: python3 -m pytest --cov=sansmic --cov=tests examples/ tests/
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ubuntu-latest
OSes:
runs-on: ubuntu-latest
strategy:
matrix:
version: ["3.12"]
os: [windows-latest, macOS-13, macOS-latest, ubuntu-latest]
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- name: Check out the commit
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ~${{ matrix.version }}
- name: Install development dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python3 -m pip install tomli
- name: Test install
run: python3 -m pip install .[tests]
- name: Test with pytest
run: python3 -m pytest --cov=sansmic --cov=tests examples/ tests/
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ matrix.os }}
- name: Test uninstall
run: python3 -m pip uninstall -y my-repository-name
# commits:
# runs-on: ubuntu-latest
# steps:
# - name: Harden Runner
# uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
# with:
# egress-policy: audit
# - name: Conventional Commits
# uses: taskmedia/action-conventional-commits@9148865058f63a6cb560ff4bfd7d534505f43646 # v1.1.3
# with:
# types: >
# build|chore|ci|docs|feat|fix|minor|patch|perf|style|refactor|test