-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (48 loc) · 1.29 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: Run tests
on:
workflow_call:
inputs:
environment:
required: true
type: string
secrets:
C8Y_PASSWORD:
required: true
workflow_dispatch:
inputs:
environment:
type: environment
description: Name of the environment to use
default: "oee-dev"
required: true
push:
branches: [ '*' ]
env:
C8Y_PASSWORD: ${{ secrets.C8Y_PASSWORD }}
C8Y_BASEURL: ${{ vars.C8Y_BASEURL }}
C8Y_TENANT: ${{ vars.C8Y_TENANT }}
C8Y_USER: ${{ vars.C8Y_USER }}
jobs:
run-tests:
runs-on: ubuntu-latest
environment: ${{ inputs.environment || 'oee-dev' }} # oee-dev for on.push event
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
path: 'repo'
- name: Check Environment
run:
echo "Running on environment ${{ inputs.environment || 'oee-dev' }}" # oee-dev for on.push event
- name: Run tests
id: tests
run: |
cd repo
python test/simulators_test.py
pip3 install c8y-api
python test/export_import_test.py
env:
C8Y_BASEURL: ${{ env.C8Y_BASEURL }}
C8Y_PASSWORD: ${{ env.C8Y_PASSWORD }}
C8Y_TENANT: ${{ env.C8Y_TENANT }}
C8Y_USER: ${{ env.C8Y_USER }}