From d4a3f5bdc9fb899080017160839d2618b93b5023 Mon Sep 17 00:00:00 2001 From: Topher Anderson <48180628+topherinternational@users.noreply.github.com> Date: Sat, 9 Dec 2023 12:25:56 +0100 Subject: [PATCH 1/4] Create python-ci.yml --- .github/workflows/python-ci.yml | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/python-ci.yml diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml new file mode 100644 index 0000000..5d0b777 --- /dev/null +++ b/.github/workflows/python-ci.yml @@ -0,0 +1,36 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: lint and test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Install plugin + run: | + pip install . + - name: Test with black, pylint, pytest + run: | + make ci From 7fc6abb4ab10b2e479a69a60a7b1eac0dec80b6e Mon Sep 17 00:00:00 2001 From: "Christopher P. Anderson" <48180628+topherinternational@users.noreply.github.com> Date: Sat, 9 Dec 2023 12:29:48 +0100 Subject: [PATCH 2/4] run on branch --- .github/workflows/python-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 5d0b777..f0f6e04 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -5,7 +5,7 @@ name: lint and test on: push: - branches: [ "main" ] + branches: [ "main", "github-ci" ] pull_request: branches: [ "main" ] From 00b41dada7629bc48214b5510c153f8b89440a23 Mon Sep 17 00:00:00 2001 From: "Christopher P. Anderson" <48180628+topherinternational@users.noreply.github.com> Date: Sat, 9 Dec 2023 12:34:56 +0100 Subject: [PATCH 3/4] correct python versions --- .github/workflows/python-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index f0f6e04..8a67549 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9"] + python-version: ["3.7", "3.8"] steps: - uses: actions/checkout@v3 From b0e30adcb04e38191103442ddbe1d4424b75bf7d Mon Sep 17 00:00:00 2001 From: "Christopher P. Anderson" <48180628+topherinternational@users.noreply.github.com> Date: Sat, 9 Dec 2023 12:38:34 +0100 Subject: [PATCH 4/4] nit --- .github/workflows/python-ci.yml | 34 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 8a67549..d66b3c5 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -5,7 +5,7 @@ name: lint and test on: push: - branches: [ "main", "github-ci" ] + branches: [ "main" ] pull_request: branches: [ "main" ] @@ -16,21 +16,21 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8"] + python-version: [ "3.7", "3.8" ] steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Install plugin - run: | - pip install . - - name: Test with black, pylint, pytest - run: | - make ci + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Install plugin + run: | + pip install . + - name: Test with black, pylint, pytest + run: | + make ci