prototype for adding user modes #146
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: Test Python flux-restful-api | |
on: | |
push: | |
branches-ignore: | |
- main | |
- gh-pages | |
jobs: | |
prepare-container: | |
runs-on: ubuntu-latest | |
outputs: | |
branch: ${{ steps.extract_branch.outputs.branch }} | |
steps: | |
- name: Extract branch name | |
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT | |
id: extract_branch | |
test-noauth: | |
runs-on: ubuntu-latest | |
needs: [prepare-container] | |
services: | |
api: | |
image: ghcr.io/flux-framework/flux-restful-api:latest | |
ports: | |
- 5000:5000 | |
env: | |
INSTALL_BRANCH: ${{ needs.prepare-container.outputs.branch }} | |
INSTALL_REPO: ${{ github.repository }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run tests without auth | |
run: | | |
cd clients/python | |
pip install -e .[all] | |
pytest -xs flux_restful_client/tests/test_api.py | |
test-auth: | |
needs: [prepare-container] | |
runs-on: ubuntu-latest | |
services: | |
api: | |
env: | |
INSTALL_BRANCH: ${{ needs.prepare-container.outputs.branch }} | |
INSTALL_REPO: ${{ github.repository }} | |
image: ghcr.io/flux-framework/flux-restful-api:latest | |
ports: | |
- 5000:5000 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run tests with auth | |
run: | | |
export FLUX_USER=fluxuser | |
export FLUX_TOKEN=12345 | |
export FLUX_REQUIRE_AUTH=true | |
export FLUX_SECRET_KEY=notsecrethoo | |
cd clients/python | |
pip install -e .[all] | |
pytest -xs flux_restful_client/tests/test_api.py |