use matrix for os

This commit is contained in:
Matthias 2022-05-27 21:03:08 +02:00
parent 3a7732003e
commit 5c3669aa00
No known key found for this signature in database
GPG Key ID: AB6D0E6C4CB65093

View File

@ -14,7 +14,7 @@ on:
env: env:
python_version: 3.9 python_version: 3.9
node_version: 16 node_version: 16
runner_ref: ubuntu-20.04 # Set the runner os in os_matrix.strategy.matrix.os
server_start_sleep: 60 server_start_sleep: 60
@ -28,9 +28,14 @@ env:
INVENTREE_ADMIN_EMAIL: test@test.com INVENTREE_ADMIN_EMAIL: test@test.com
jobs: jobs:
os_matrix:
strategy:
matrix:
os: [ubuntu-20.04]
pep_style: pep_style:
name: Python Style (PEP8) name: Python Style (PEP8)
runs-on: ${{ env.runner_ref }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout code - name: Checkout code
@ -51,7 +56,7 @@ jobs:
javascript: javascript:
name: JS Template Files name: JS Template Files
needs: pep_style needs: pep_style
runs-on: ${{ env.runner_ref }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout Code - name: Checkout Code
@ -87,7 +92,7 @@ jobs:
html: html:
name: HTML Template Files name: HTML Template Files
needs: pep_style needs: pep_style
runs-on: ${{ env.runner_ref }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout Code - name: Checkout Code
@ -118,7 +123,7 @@ jobs:
pre-commit: pre-commit:
name: pre-commit name: pre-commit
needs: pep_style needs: pep_style
runs-on: ${{ env.runner_ref }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python ${{ env.python_version }} - name: Set up Python ${{ env.python_version }}
@ -131,7 +136,7 @@ jobs:
python: python:
name: Test inventree-python name: Test inventree-python
needs: pre-commit needs: pre-commit
runs-on: ${{ env.runner_ref }} runs-on: ${{ matrix.os }}
env: env:
wrapper_name: inventree-python wrapper_name: inventree-python
@ -171,7 +176,7 @@ jobs:
coverage: coverage:
name: Tests + Coverage [SQLite] name: Tests + Coverage [SQLite]
needs: ['javascript', 'html', 'pre-commit'] needs: ['javascript', 'html', 'pre-commit']
runs-on: ${{ env.runner_ref }} runs-on: ${{ matrix.os }}
env: env:
INVENTREE_DB_NAME: ./inventree.sqlite INVENTREE_DB_NAME: ./inventree.sqlite
@ -217,7 +222,7 @@ jobs:
postgres: postgres:
name: Tests [PostgreSQL] name: Tests [PostgreSQL]
needs: ['javascript', 'html', 'pre-commit'] needs: ['javascript', 'html', 'pre-commit']
runs-on: ${{ env.runner_ref }} runs-on: ${{ matrix.os }}
if: github.event_name == 'push' if: github.event_name == 'push'
env: env:
@ -282,7 +287,7 @@ jobs:
mysql: mysql:
name: Tests [MySQL] name: Tests [MySQL]
needs: ['javascript', 'html', 'pre-commit'] needs: ['javascript', 'html', 'pre-commit']
runs-on: ${{ env.runner_ref }} runs-on: ${{ matrix.os }}
if: github.event_name == 'push' if: github.event_name == 'push'
env: env: