Skip to content

ci: Temporary removal of behaviour testing (to allow playwright test … #136

ci: Temporary removal of behaviour testing (to allow playwright test …

ci: Temporary removal of behaviour testing (to allow playwright test … #136

---
name: latest stack test
on:
push:
branches:
- main
schedule:
- cron: '35 6 * * *'
workflow_dispatch:
# Only one workflow run is allowed at any time.
# The tests rely on the same stack user and name.
concurrency:
group: behaviour-stack
jobs:
behaviour-test:
runs-on: ubuntu-latest
environment: behaviour-stack-alan
steps:
# We have to avoid Python 3.12 (3.12.8) as the GitHub Action
# always generates an argparse error when we try and run
# the awx command from within the 'behave' tests.
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Checkout
uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-path: .venv
installer-parallel: true
- name: Install Dependencies
run: poetry install --no-interaction --with dev
- name: Static Analysis
run: |
source .venv/bin/activate
pre-commit run --all-files
# Dry-run the behaviour tests.
# This checks that the tests and steps are syntactically correct,
# crucially checking for missing steps.
#
# We do not run 'Work in Progress' (WIP) tests
# (i.e. tests tagged with @wip).
- name: Behaviour Tests (Dry Run)
working-directory: ./behaviour
run: |
source ../.venv/bin/activate
behave --tags=-wip --dry-run
# We do not run 'Work in Progress' (WIP) tests
# (i.e. tests tagged with @wip).
# - name: Run Behaviour Tests
# working-directory: ./behaviour
# run: |
# source ../.venv/bin/activate
# playwright install
# behave --tags=-wip
# env:
# BEHAVIOUR_AWS_ACCESS_KEY_ID: ${{ secrets.BEHAVIOUR_AWS_ACCESS_KEY_ID }}
# BEHAVIOUR_AWS_SECRET_ACCESS_KEY: ${{ secrets.BEHAVIOUR_AWS_SECRET_ACCESS_KEY }}
# BEHAVIOUR_AWS_ENDPOINT_URL: ${{ secrets.BEHAVIOUR_AWS_ENDPOINT_URL }}
# BEHAVIOUR_AWX_HOST: ${{ secrets.BEHAVIOUR_AWX_HOSTNAME }}
# BEHAVIOUR_AWX_USERNAME: ${{ secrets.BEHAVIOUR_AWX_USERNAME }}
# BEHAVIOUR_AWX_PASSWORD: ${{ secrets.BEHAVIOUR_AWX_PASSWORD }}
# BEHAVIOUR_STACK_USERNAME: ${{ secrets.BEHAVIOUR_STACK_USERNAME }}
# BEHAVIOUR_STACK_PASSWORD: ${{ secrets.BEHAVIOUR_STACK_PASSWORD }}
# BEHAVIOUR_STACK_CLIENT_ID_SECRET: ${{ secrets.BEHAVIOUR_STACK_CLIENT_ID_SECRET }}
# BEHAVIOUR_STACK_NAME: behaviour
playwright-test:
runs-on: ubuntu-latest
environment: behaviour-stack-alan
needs:
- behaviour-test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '23'
- name: Install dependencies
run: npm ci
- name: Install playwright browsers
run: npx playwright install --with-deps chrome
- name: Run Playwright Tests
run: |
npx playwright test
env:
BEHAVIOUR_AWX_USERNAME: ${{ secrets.BEHAVIOUR_AWX_USERNAME }}
BEHAVIOUR_STACK_USERNAME: ${{ secrets.BEHAVIOUR_STACK_USERNAME }}
BEHAVIOUR_STACK_PASSWORD: ${{ secrets.BEHAVIOUR_STACK_PASSWORD }}
BEHAVIOUR_STACK_NAME: behaviour
- name: Archive Playwright Report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 7