From fbcf4305da3b4233830cdd358137aa953d0cfc77 Mon Sep 17 00:00:00 2001 From: fr33l Date: Wed, 3 Apr 2024 18:11:32 +0300 Subject: [PATCH 1/5] Switch to github actions --- .github/workflows/python.yml | 31 +++++++++++++++++++++++++++++++ .travis.yml | 10 ---------- 2 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/python.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..9a5c084 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,31 @@ +name: Python CI + +on: + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + python-version: [2.7, 3.6, 3.7, 3.8, 3.9] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run tests + run: python setup.py test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b4cc851..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: python -python: - - "2.7" - - "3.6" - - "3.7" - - "3.8" - - "3.9" -install: - - pip install -r requirements.txt -script: python setup.py test From 522cb23d9d713351b98dd31e27834cab7b9d78bd Mon Sep 17 00:00:00 2001 From: fr33l Date: Wed, 3 Apr 2024 18:33:29 +0300 Subject: [PATCH 2/5] use only modern python versions --- .github/workflows/python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 9a5c084..b04866e 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - python-version: [2.7, 3.6, 3.7, 3.8, 3.9] + python-version: [3.8, 3.9, 3.10, 3.11, 3.12] steps: - name: Checkout repository From 68dfe494c249926835b0a3d64731702433606ca9 Mon Sep 17 00:00:00 2001 From: fr33l Date: Wed, 3 Apr 2024 18:52:42 +0300 Subject: [PATCH 3/5] use newer versions of actions --- .github/workflows/python.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index b04866e..d9b406b 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -11,14 +11,14 @@ jobs: strategy: matrix: - python-version: [3.8, 3.9, 3.10, 3.11, 3.12] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} From fb4303a44fcdee906066ac5380f424859c7380f7 Mon Sep 17 00:00:00 2001 From: fr33l Date: Wed, 3 Apr 2024 19:39:49 +0300 Subject: [PATCH 4/5] Python 2/7 --- .github/workflows/python.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index d9b406b..448e1ad 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -29,3 +29,19 @@ jobs: - name: Run tests run: python setup.py test + + build-27: + runs-on: ubuntu-latest + steps: + - name: Test on Python 2.7 + uses: LizardByte/setup-python-action@master + with: + python-version: '2.7' + + - name: Install dependencies for Python 2.7 + run: | + python2.7 -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run tests for Python 2.7 + run: python2.7 setup.py test From 8bfba883874a5a2a4af2835bae86d410651ef50c Mon Sep 17 00:00:00 2001 From: fr33l Date: Wed, 3 Apr 2024 19:45:42 +0300 Subject: [PATCH 5/5] use checkout as well in separate build --- .github/workflows/python.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 448e1ad..85c8eea 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -33,10 +33,10 @@ jobs: build-27: runs-on: ubuntu-latest steps: - - name: Test on Python 2.7 - uses: LizardByte/setup-python-action@master - with: - python-version: '2.7' + - uses: actions/checkout@v4 + - uses: LizardByte/setup-python-action@master + with: + python-version: '2.7' - name: Install dependencies for Python 2.7 run: |