From 0dcf6f102016e7fd332da31c5961a0ecc82545f2 Mon Sep 17 00:00:00 2001 From: Zach Moody Date: Mon, 22 Jun 2020 14:37:11 -0500 Subject: [PATCH 1/4] Use github actions for PRs --- .github/workflows/pr.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..85a51bd8 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,31 @@ +name: PR Test + +on: [pull-request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python: [2.7, 3.6] + + steps: + - uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + + - name: Install pynetbox and testing packages. + run: pip install . pycodestyle + + - name: Run Linter + run: | + pycodestyle pynetbox + pycodestyle --ignore=E501 tests + + - name: Run Tests + run: python -m unittest discover + From 43d9bf4f195c2cb1621d3154ebd877e1396d8065 Mon Sep 17 00:00:00 2001 From: Zach Moody Date: Mon, 22 Jun 2020 14:39:11 -0500 Subject: [PATCH 2/4] update action --- pr.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 pr.yml diff --git a/pr.yml b/pr.yml new file mode 100644 index 00000000..26b4bd8e --- /dev/null +++ b/pr.yml @@ -0,0 +1,31 @@ +name: PR Test + +on: [pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python: [2.7, 3.6] + + steps: + - uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + + - name: Install pynetbox and testing packages. + run: pip install . pycodestyle + + - name: Run Linter + run: | + pycodestyle pynetbox + pycodestyle --ignore=E501 tests + + - name: Run Tests + run: python -m unittest discover + From 2979c75b4e65a4986134da43cf577f8b1180a817 Mon Sep 17 00:00:00 2001 From: Zach Moody Date: Mon, 22 Jun 2020 14:41:22 -0500 Subject: [PATCH 3/4] fix pr workflow --- .github/workflows/pr.yml | 2 +- pr.yml | 31 ------------------------------- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 85a51bd8..26b4bd8e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,6 +1,6 @@ name: PR Test -on: [pull-request] +on: [pull_request] jobs: build: diff --git a/pr.yml b/pr.yml deleted file mode 100644 index 26b4bd8e..00000000 --- a/pr.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: PR Test - -on: [pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python: [2.7, 3.6] - - steps: - - uses: actions/checkout@v2 - - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - - name: Install pynetbox and testing packages. - run: pip install . pycodestyle - - - name: Run Linter - run: | - pycodestyle pynetbox - pycodestyle --ignore=E501 tests - - - name: Run Tests - run: python -m unittest discover - From bc84a06664322916d4643943d649895aa310740c Mon Sep 17 00:00:00 2001 From: Zach Moody Date: Mon, 22 Jun 2020 14:44:52 -0500 Subject: [PATCH 4/4] add mock --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 26b4bd8e..c42d8d29 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -19,7 +19,7 @@ jobs: python-version: ${{ matrix.python }} - name: Install pynetbox and testing packages. - run: pip install . pycodestyle + run: pip install . pycodestyle mock - name: Run Linter run: |