From ae70391d395d8844391fde7945d0602fad1b9496 Mon Sep 17 00:00:00 2001 From: Sandy Kaur Date: Thu, 11 May 2023 11:04:41 -0500 Subject: [PATCH] feat: github action for running component tests Signed-off-by: Sandy Kaur --- .github/workflows/workflow.yml | 30 ++++++++++++++++++++++++++++++ requirements.txt | 1 + 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 000000000..11e07d215 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,30 @@ +name: Test +on: + # Run workflow when a PR is opened, reopened, or updated on its head branch + pull_request: + branches: + - devel + +jobs: + build: + runs-on: + - ubuntu-latest + + steps: + # Checkout repo + - uses: actions/checkout@v3 + + # Dependencies + - name: Set up Python 3.9 + uses: actions/setup-python@v1 + with: + python-version: 3.9 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + # Test + - name: Run component tests with pytest + run: pytest tests/component \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index a6646e7b9..8fde9977a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ grpcio grpcio-tools +pytest