mirror of
https://github.com/pimoroni/grow-python
synced 2025-10-25 15:19:23 +00:00
QA: Update workflows.
This commit is contained in:
41
.github/workflows/build.yml
vendored
Normal file
41
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Python ${{ matrix.python }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python: ['3.9', '3.10', '3.11']
|
||||||
|
|
||||||
|
env:
|
||||||
|
RELEASE_FILE: ${{ github.event.repository.name }}-${{ github.event.release.tag_name || github.sha }}-py${{ matrix.python }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Python ${{ matrix.python }}
|
||||||
|
uses: actions/setup-python@v3
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python }}
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: |
|
||||||
|
make dev-deps
|
||||||
|
|
||||||
|
- name: Build Packages
|
||||||
|
run: |
|
||||||
|
make build
|
||||||
|
|
||||||
|
- name: Upload Packages
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ env.RELEASE_FILE }}
|
||||||
|
path: dist/
|
||||||
36
.github/workflows/qa.yml
vendored
Normal file
36
.github/workflows/qa.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
name: QA
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: linting & spelling
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
TERM: xterm-256color
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Python '3,11'
|
||||||
|
uses: actions/setup-python@v3
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: |
|
||||||
|
make dev-deps
|
||||||
|
|
||||||
|
- name: Run Quality Assurance
|
||||||
|
run: |
|
||||||
|
make qa
|
||||||
|
|
||||||
|
- name: Run Code Checks
|
||||||
|
run: |
|
||||||
|
make check
|
||||||
22
.github/workflows/test.yml
vendored
22
.github/workflows/test.yml
vendored
@@ -1,37 +1,41 @@
|
|||||||
name: Python Tests
|
name: Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
name: Python ${{ matrix.python }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python: ['3.9', '3.10', '3.11']
|
python: ['3.9', '3.10', '3.11']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python }}
|
- name: Set up Python ${{ matrix.python }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python }}
|
python-version: ${{ matrix.python }}
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade setuptools tox
|
make dev-deps
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
working-directory: library
|
|
||||||
run: |
|
run: |
|
||||||
tox -e py
|
make pytest
|
||||||
|
|
||||||
- name: Coverage
|
- name: Coverage
|
||||||
|
if: ${{ matrix.python == '3.9' }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
working-directory: library
|
|
||||||
run: |
|
run: |
|
||||||
python -m pip install coveralls
|
python -m pip install coveralls
|
||||||
coveralls --service=github
|
coveralls --service=github
|
||||||
if: ${{ matrix.python == '3.11' }}
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user