Also handle missing ~/.sumo folder and revoked token #136
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: pytest | |
on: | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9"] | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Azure Login | |
uses: Azure/login@v1 | |
with: | |
client-id: f96c150d-cacf-4257-9cc9-54b2c68ec4ce | |
tenant-id: 3aa4a235-b6e2-48d5-9195-7fcf05b459b0 | |
subscription-id: 87897772-fb27-495f-ae40-486a2df57baa | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install sumo-wrapper-python | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
- name: Run pytest | |
run: | | |
access_token=$(az account get-access-token --scope api://88d2b022-3539-4dda-9e66-853801334a86/.default --query accessToken --output tsv) | |
echo ${#access_token} | |
export ACCESS_TOKEN=$access_token | |
pip install -r requirements/requirements_test.txt | |
pytest -q -s -x --disable-warnings tests/test_sumo_thin_client.py |