-
Notifications
You must be signed in to change notification settings - Fork 102
71 lines (58 loc) · 1.98 KB
/
backend.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Backend Testing
on:
push:
paths:
- hyperglass/**
- .github/**
pull_request:
jobs:
backend:
name: Backend Tests
strategy:
fail-fast: false
matrix:
node-version: [20.x]
pnpm-version: [8]
redis-version: [latest]
python-version: ["3.11", "3.12"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Rye
uses: sksat/setup-rye@v0.23.1
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install PNPM
uses: pnpm/action-setup@v3
with:
version: ${{ matrix.pnpm-version }}
- name: Start Redis
uses: supercharge/redis-github-action@1.7.0
with:
redis-version: ${{ matrix.redis-version }}
- name: Prepare
run: |
mkdir -p "$HOME/hyperglass"
echo "HYPERGLASS_APP_PATH=$HOME/hyperglass" >> $GITHUB_ENV
echo "HYPERGLASS_HOST=127.0.0.1" >> $GITHUB_ENV
echo "HYPERGLASS_PORT=8001" >> $GITHUB_ENV
- name: Install
run: rye sync
- name: Activate virtualenv
run: |
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Lint (Rye)
run: rye lint
- name: Tests (PyTest)
run: pytest hyperglass --ignore hyperglass/plugins/external
- name: Run hyperglass
run: ".tests/ga-backend-app.sh"