diff --git a/.github/workflows/Pynetbox.yaml b/.github/workflows/Pynetbox.yaml new file mode 100644 index 00000000..38a371bc --- /dev/null +++ b/.github/workflows/Pynetbox.yaml @@ -0,0 +1,36 @@ +name: Pynetbox Data Uploader Tests + +on: + push: + branches: + - master + pull_request: + paths: + - "Pynetbox_Data_Uploader/**" + - ".github/workflows/Pynetbox.yaml" + +jobs: + test_and_lint: + runs-on: ubuntu-20.04 + strategy: + matrix: + python-version: ["3.x"] + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + cache: "pip" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r ./requirements.txt + + - name: Run tests + run: cd Tests/ && python3 -m pytest . + + - name: Analyse with pylint + run: | + pylint lib