Xqt has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/855178 )

Change subject: [tests] Update github actions
......................................................................

[tests] Update github actions

- Python 12 can be used with actions/setup-python
- fix/add concurrency
- split is not available for os other than ubuntu

Change-Id: Icc95d5458b39cec7af08cd5e4aaec46325ee6d19
---
M .github/workflows/doctest.yml
M .github/workflows/login_tests-ci.yml
M .github/workflows/oauth_tests-ci.yml
M .github/workflows/pywikibot-ci.yml
4 files changed, 12 insertions(+), 36 deletions(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved



diff --git a/.github/workflows/doctest.yml b/.github/workflows/doctest.yml
index 34c3aeb..27e3117 100644
--- a/.github/workflows/doctest.yml
+++ b/.github/workflows/doctest.yml
@@ -1,14 +1,15 @@
-# This workflow will install Python dependencies, run Pywikibot tests
-# 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: Doctest CI
+# Run Pywikibot doctests  with a variety of Python versions

 on:
   push:
     branches: [ master ]


+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
 env:
   PYWIKIBOT_TEST_RUNNING: 1
   PYWIKIBOT_USERNAME: Pywikibot-test
@@ -26,7 +27,7 @@
         os: [ "windows-latest", "macOS-latest", "ubuntu-latest" ]
         python-version: ["pypy3.7", "3.11", "3.6" ]
         include:
-          - python-version: "3.12"
+          - python-version: "3.12.0-alpha - 3.12.0"
             os: ubuntu-latest

     steps:
@@ -37,14 +38,6 @@

     - name: Set up Python ${{ matrix.python-version }}
       uses: actions/setup-python@v4
-      if: ${{ matrix.python-version != '3.12' }}
-      with:
-        python-version: ${{ matrix.python-version }}
-
-    # use deadsnakes/action until actions/setup-python supports Python 3.12
-    - name: Set up development Python ${{ matrix.python-version }}
-      uses: deadsnakes/[email protected]
-      if: ${{ matrix.python-version == '3.12' }}
       with:
         python-version: ${{ matrix.python-version }}

diff --git a/.github/workflows/login_tests-ci.yml 
b/.github/workflows/login_tests-ci.yml
index c5d1b6d..c1c9d80 100644
--- a/.github/workflows/login_tests-ci.yml
+++ b/.github/workflows/login_tests-ci.yml
@@ -23,7 +23,7 @@
       max-parallel: 1

       matrix:
-        python-version: ["pypy3.7", "3.6", "3.7", "3.8", "3.9", "3.10", 
"3.11", "3.12"]
+        python-version: ["pypy3.7", "3.6", "3.7", "3.8", "3.9", "3.10", 
"3.11", "3.12.0-alpha - 3.12.0"]
         site: ['wikipedia:en', 'wikisource:zh']
         include:
           - python-version: 3.6
@@ -46,7 +46,7 @@
             site: wikidata:wikidata
           - python-version: 3.8
             site: wowwiki:uk
-          - python-version: 3.12
+          - python-version: "3.12.0-alpha - 3.12.0"
             site: wikipedia:test
           - python-version: 3
             site: wikipedia:de
@@ -60,14 +60,6 @@

     - name: Set up Python ${{ matrix.python-version }}
       uses: actions/setup-python@v4
-      if: ${{ matrix.python-version != '3.12' }}
-      with:
-        python-version: ${{ matrix.python-version }}
-
-    # use deadsnakes/action until actions/setup-python supports Python 3.12
-    - name: Set up development Python ${{ matrix.python-version }}
-      uses: deadsnakes/[email protected]
-      if: ${{ matrix.python-version == '3.12' }}
       with:
         python-version: ${{ matrix.python-version }}

diff --git a/.github/workflows/oauth_tests-ci.yml 
b/.github/workflows/oauth_tests-ci.yml
index d04b23d..42d42c7 100644
--- a/.github/workflows/oauth_tests-ci.yml
+++ b/.github/workflows/oauth_tests-ci.yml
@@ -6,7 +6,7 @@
     branches: [ master ]

 concurrency:
-  group: ${{ github.ref }}
+  group: ${{ github.workflow }}-${{ github.ref }}
   cancel-in-progress: true

 env:
@@ -16,7 +16,7 @@

 jobs:
   build:
-    runs-on: ${{ matrix.os || 'ubuntu-latest' }}
+    runs-on: ubuntu-latest
     timeout-minutes: 2

     strategy:
@@ -24,7 +24,6 @@
       max-parallel: 15

       matrix:
-        os: [ "windows-latest", "macOS-latest", "ubuntu-latest" ]
         python-version: ["pypy3.7", "3.11", "3.10", "3.9", "3.8", "3.7", "3.6"]
         family: ['wikipedia']
         code: ['test']
diff --git a/.github/workflows/pywikibot-ci.yml 
b/.github/workflows/pywikibot-ci.yml
index 5e6f876..cb734b5 100644
--- a/.github/workflows/pywikibot-ci.yml
+++ b/.github/workflows/pywikibot-ci.yml
@@ -8,7 +8,7 @@
     branches: [ master ]

 concurrency:
-  group: ${{ github.ref }}
+  group: ${{ github.workflow }}-${{ github.ref }}
   cancel-in-progress: true

 env:
@@ -26,7 +26,7 @@
       max-parallel: 15

       matrix:
-        python-version: ["pypy3.7", "3.6", "3.7", "3.8", "3.9", "3.10", 
"3.11", "3.12"]
+        python-version: ["pypy3.7", "3.6", "3.7", "3.8", "3.9", "3.10", 
"3.11", "3.12.0-alpha - 3.12.0"]
         site: ['wikipedia:en', 'wikisource:zh']
         test_prod_only: [true]
         include:
@@ -68,14 +68,6 @@

     - name: Set up Python ${{ matrix.python-version }}
       uses: actions/setup-python@v4
-      if: ${{ matrix.python-version != '3.12' }}
-      with:
-        python-version: ${{ matrix.python-version }}
-
-    # use deadsnakes/action until actions/setup-python supports Python 3.12
-    - name: Set up development Python ${{ matrix.python-version }}
-      uses: deadsnakes/[email protected]
-      if: ${{ matrix.python-version == '3.12' }}
       with:
         python-version: ${{ matrix.python-version }}


--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/855178
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Icc95d5458b39cec7af08cd5e4aaec46325ee6d19
Gerrit-Change-Number: 855178
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to