Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
snaselj committed Jan 25, 2024
1 parent e1990a6 commit 1fa6517
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:

jobs:
black:
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-latest"
env:
INVOKE_PYLINT_NAUTOBOT_LOCAL: "True"
steps:
Expand All @@ -28,7 +28,7 @@ jobs:
- name: "Linting: black"
run: "poetry run invoke black"
bandit:
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-latest"
env:
INVOKE_PYLINT_NAUTOBOT_LOCAL: "True"
steps:
Expand All @@ -39,7 +39,7 @@ jobs:
- name: "Linting: bandit"
run: "poetry run invoke bandit"
ruff:
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-latest"
env:
INVOKE_PYLINT_NAUTOBOT_LOCAL: "True"
steps:
Expand All @@ -50,7 +50,7 @@ jobs:
- name: "Linting: ruff"
run: "poetry run invoke ruff"
check-docs-build:
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-latest"
env:
INVOKE_PYLINT_NAUTOBOT_LOCAL: "True"
steps:
Expand All @@ -61,7 +61,7 @@ jobs:
- name: "Check Docs Build"
run: "poetry run invoke build-and-check-docs"
flake8:
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-latest"
env:
INVOKE_PYLINT_NAUTOBOT_LOCAL: "True"
steps:
Expand All @@ -72,7 +72,7 @@ jobs:
- name: "Linting: flake8"
run: "poetry run invoke flake8"
poetry:
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-latest"
env:
INVOKE_PYLINT_NAUTOBOT_LOCAL: "True"
steps:
Expand All @@ -83,7 +83,7 @@ jobs:
- name: "Checking: poetry lock file"
run: "poetry run invoke lock --check"
yamllint:
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-latest"
env:
INVOKE_PYLINT_NAUTOBOT_LOCAL: "True"
steps:
Expand All @@ -101,7 +101,7 @@ jobs:
- "poetry"
- "yamllint"
- "black"
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-latest"
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -132,8 +132,6 @@ jobs:
build-args: |
NAUTOBOT_VER=${{ matrix.nautobot-version }}
PYTHON_VER=${{ matrix.python-version }}
- name: "Copy credentials"
run: "cp development/creds.example.env development/creds.env"
- name: "Linting: pylint"
run: "poetry run invoke pylint"
pytest:
Expand All @@ -147,7 +145,7 @@ jobs:
include:
- python-version: "3.8"
nautobot-version: "2.1"
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-latest"
env:
INVOKE_PYLINT_NAUTOBOT_PYTHON_VER: "${{ matrix.python-version }}"
INVOKE_PYLINT_NAUTOBOT_NAUTOBOT_VER: "${{ matrix.nautobot-version }}"
Expand All @@ -173,23 +171,21 @@ jobs:
build-args: |
NAUTOBOT_VER=${{ matrix.nautobot-version }}
PYTHON_VER=${{ matrix.python-version }}
- name: "Copy credentials"
run: "cp development/creds.example.env development/creds.env"
- name: "Run Tests"
run: "poetry run invoke pytest"
publish_gh:
needs:
- "pytest"
name: "Publish to GitHub"
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-latest"
if: "startsWith(github.ref, 'refs/tags/v')"
env:
INVOKE_PYLINT_NAUTOBOT_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Set up Python"
uses: "actions/setup-python@v4"
uses: "actions/setup-python@v5"
with:
python-version: "3.11"
- name: "Install Python Packages"
Expand All @@ -216,15 +212,15 @@ jobs:
needs:
- "pytest"
name: "Push Package to PyPI"
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-latest"
if: "startsWith(github.ref, 'refs/tags/v')"
env:
INVOKE_PYLINT_NAUTOBOT_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Set up Python"
uses: "actions/setup-python@v4"
uses: "actions/setup-python@v5"
with:
python-version: "3.11"
- name: "Install Python Packages"
Expand All @@ -248,7 +244,7 @@ jobs:
needs:
- "publish_gh"
- "publish_pypi"
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-latest"
env:
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}"
SLACK_MESSAGE: >-
Expand Down

0 comments on commit 1fa6517

Please sign in to comment.