chore: Updating examples for CARLA and driving domain (#257) #650
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: tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: Git ref on which to run the tests. | |
type: string | |
required: true | |
options: | |
description: Options to pass to pytest. | |
default: --no-graphics | |
type: string | |
workflow_call: | |
inputs: | |
ref: | |
description: Git ref on which to run the tests. | |
type: string | |
options: | |
description: Options to pass to pytest. | |
default: --no-graphics | |
type: string | |
jobs: | |
check-format: | |
uses: ./.github/workflows/check-formatting.yml | |
test: | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
os: [ubuntu-latest, windows-latest, macos-13, macos-latest] | |
include: | |
# Only run slow tests on the latest version of Python | |
- python-version: "3.12" | |
slow: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout given ref | |
uses: actions/checkout@v3 | |
if: inputs.ref != '' | |
with: | |
ref: ${{ inputs.ref }} | |
- name: Checkout current branch | |
uses: actions/checkout@v3 | |
if: inputs.ref == '' | |
with: | |
ref: ${{ github.ref }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Update pip | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install Scenic and dependencies | |
run: | | |
python -m pip install -e ".[test-full]" | |
- name: Run pytest | |
run: | | |
pytest ${{ inputs.options || (matrix.slow && '--no-graphics' || '--fast --no-graphics') }} |