Run tests #232
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |