feat: Add client for SystemLink jobs API #513
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: Python package | |
on: | |
push: | |
branches: [master, main] | |
pull_request: | |
branches: [master, main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install poetry | |
run: pipx install poetry | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "poetry" | |
- run: poetry install | |
- run: > | |
poetry run pytest | |
--cloud-api-key "${{ secrets.CLOUD_API_KEY }}" | |
--enterprise-uri "https://test-api.lifecyclesolutions.ni.com" --enterprise-api-key "${{ secrets.ENTERPRISE_API_KEY }}" | |
- run: poetry run poe check | |
- run: poetry run poe lint | |
- run: poetry run poe types | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Install poetry | |
run: pipx install poetry | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache: "poetry" | |
- run: poetry install | |
- name: Semantic release | |
run: | | |
pip install python-semantic-release==7.34.6 | |
git config --global user.name "github-actions" | |
git config --global user.email "action@github.com" | |
semantic-release publish | |
env: | |
# To generate a new token use the following guide, providing access to the "repo" scope. | |
# https://docs.github.com/en/enterprise-server@3.4/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token | |
# Once you update the secret on the repo, ensure you update the master/main protected branch policy | |
# to allow your user permission to "bypass required pull requests". | |
GH_TOKEN: ${{secrets.GH_TOKEN}} | |
REPOSITORY_USERNAME: ${{secrets.REPOSITORY_USERNAME}} | |
REPOSITORY_PASSWORD: ${{secrets.PYPI_PASSWORD}} |