2021-01-01 13:57:39 -07:00
|
|
|
name: Backend Testing
|
2021-12-06 16:44:46 -07:00
|
|
|
on:
|
|
|
|
- push
|
|
|
|
- pull_request
|
2021-01-01 11:47:09 -07:00
|
|
|
|
|
|
|
jobs:
|
2021-01-03 10:31:52 -07:00
|
|
|
backend:
|
|
|
|
name: Backend Tests
|
2021-01-01 11:47:09 -07:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-01-01 14:23:15 -07:00
|
|
|
node-version: [14.x]
|
|
|
|
redis-version: [5, 6]
|
2021-12-06 16:44:46 -07:00
|
|
|
poetry-version: [1.1.11]
|
|
|
|
python-version: [3.8, 3.9]
|
|
|
|
os: [ubuntu-latest]
|
2021-01-03 10:41:13 -07:00
|
|
|
runs-on: ${{ matrix.os }}
|
2021-01-01 14:23:15 -07:00
|
|
|
|
2021-01-01 11:47:09 -07:00
|
|
|
steps:
|
2021-01-01 14:23:15 -07:00
|
|
|
- name: Git Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install Python
|
|
|
|
uses: actions/setup-python@v2
|
2021-01-01 11:47:09 -07:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2021-01-01 14:23:15 -07:00
|
|
|
|
|
|
|
- name: Install Poetry
|
2021-01-01 11:47:09 -07:00
|
|
|
uses: abatilo/actions-poetry@v2.0.0
|
|
|
|
with:
|
|
|
|
poetry-version: ${{ matrix.poetry-version }}
|
2021-01-01 14:23:15 -07:00
|
|
|
|
|
|
|
- name: Install Node
|
2021-12-06 16:44:46 -07:00
|
|
|
uses: actions/setup-node@v2
|
2021-01-01 14:23:15 -07:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
|
|
|
|
- name: Start Redis
|
|
|
|
uses: supercharge/redis-github-action@1.1.0
|
|
|
|
with:
|
|
|
|
redis-version: ${{ matrix.redis-version }}
|
|
|
|
|
2021-12-06 17:23:57 -07:00
|
|
|
- name: Prepare
|
2021-12-06 17:31:08 -07:00
|
|
|
run: |
|
|
|
|
echo "HYPERGLASS_APP_PATH=$HOME/hyperglass" >> $GITHUB_ENV
|
2021-12-06 17:34:07 -07:00
|
|
|
mkdir -p "$HYPERGLASS_APP_PATH"
|
2021-12-06 17:23:57 -07:00
|
|
|
|
2021-12-06 17:12:44 -07:00
|
|
|
- name: Install (Poetry)
|
2021-01-01 12:07:58 -07:00
|
|
|
run: poetry install
|
2021-01-01 14:23:15 -07:00
|
|
|
|
2021-12-06 17:12:44 -07:00
|
|
|
- name: Lint (Flake8)
|
|
|
|
run: poetry run task lint
|
|
|
|
|
|
|
|
- name: Test (PyTest)
|
|
|
|
run: poetry run task test
|
2021-01-01 14:23:15 -07:00
|
|
|
|
2021-01-01 13:57:39 -07:00
|
|
|
- name: Run hyperglass
|
2021-01-04 00:36:45 -07:00
|
|
|
run: '.tests/ga-backend-app.sh'
|