-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (47 loc) · 1.28 KB
/
test.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
name: Tests
on:
push:
branches:
- main
workflow_dispatch:
jobs:
light-test:
runs-on: ubuntu-latest
env:
BEAM_AUTH_TOKEN: ${{ secrets.BEAM_AUTH_TOKEN }}
BEAM_WORKSPACE_ID: ${{ secrets.BEAM_WORKSPACE_ID }}
steps:
- uses: actions/checkout@v3
- name: set up python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: install poetry
uses: snok/install-poetry@v1
with:
version: '1.5.1'
virtualenvs-create: true
virtualenvs-in-project: true
- name: load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: configure beam
run: |
source .venv/bin/activate
mkdir -p ~/.beam
cat << EOF > ~/.beam/config.ini
[default]
token = ${{ secrets.BEAM_AUTH_TOKEN }}
gateway_host = gateway.beam.cloud
gateway_port = 443
EOF
- name: run tests
run: |
source .venv/bin/activate
pytest tests/light_test.py