Update .github/workflows/main.yml
This commit is contained in:
39
.github/workflows/main.yml
vendored
39
.github/workflows/main.yml
vendored
@@ -1,4 +1,5 @@
|
||||
name: CI
|
||||
name: CI/CD
|
||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -8,34 +9,12 @@ on:
|
||||
- '*'
|
||||
pull_request:
|
||||
|
||||
|
||||
env:
|
||||
# This is the default version of Python to use in most steps which aren't specific
|
||||
DEFAULT_PYTHON_VERSION: "3.11"
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install nox
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install nox
|
||||
|
||||
- name: Lint and typing
|
||||
run: |
|
||||
nox -rs lint typing
|
||||
|
||||
- name: Tests
|
||||
run: |
|
||||
nox -rs tests -- -v
|
||||
|
||||
build_publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: tests
|
||||
@@ -43,10 +22,10 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.12
|
||||
- name: Set up Python ${{ env.DEFAULT_PYTHON_VERSION }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.12
|
||||
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
|
||||
|
||||
- name: Install tools
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user