78 lines
1.9 KiB
YAML
78 lines
1.9 KiB
YAML
name: Commit Tests
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
concurrency:
|
|
group: ${{ github.head_ref || github.ref }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
metadata:
|
|
runs-on: ubuntu-latest
|
|
name: Metadata
|
|
outputs:
|
|
version: ${{ steps.version.outputs.VERSION }}
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Get Version
|
|
id: version
|
|
shell: bash
|
|
run: |
|
|
echo ::set-output name=VERSION::$(git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g')
|
|
- name: ${{ steps.version.outputs.VERSION }}
|
|
shell: bash
|
|
run: |
|
|
echo ${{ steps.version.outputs.VERSION }}
|
|
|
|
python:
|
|
name: "Python Tests"
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- metadata
|
|
strategy:
|
|
matrix:
|
|
action:
|
|
- lint
|
|
- coverage
|
|
- security-checks
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.10"
|
|
- name: Install Dependencies
|
|
run: cd api && make setup
|
|
- name: Echo dependencies
|
|
run: cd api && ./venv/bin/pip freeze
|
|
- name: ${{ needs.metadata.outputs.version }} / ${{ matrix.action }}
|
|
run: cd api && make ${{ matrix.action }}
|
|
|
|
nodejs:
|
|
name: "NodeJs Tests"
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- metadata
|
|
strategy:
|
|
matrix:
|
|
action:
|
|
- "test:ci"
|
|
- "tsc:ci"
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
cache: "yarn"
|
|
cache-dependency-path: webapp/yarn.lock
|
|
- name: Install Dependencies
|
|
run: cd webapp && yarn install
|
|
- name: ${{ needs.metadata.outputs.version }} / ${{ matrix.action }}
|
|
run: cd webapp && yarn ${{ matrix.action }}
|