From ad5685869feba36f891fa9fb802eed6edeee9108 Mon Sep 17 00:00:00 2001
From: Oleg Kovalov <oleg@hey.com>
Date: Fri, 3 May 2024 11:00:00 +0200
Subject: [PATCH] Extract Autobahn test suite to a separate CI flow

---
 .github/workflows/autobahn.yml | 44 ++++++++++++++++++++++++++++++++++
 .github/workflows/main.yml     | 17 -------------
 2 files changed, 44 insertions(+), 17 deletions(-)
 create mode 100644 .github/workflows/autobahn.yml

diff --git a/.github/workflows/autobahn.yml b/.github/workflows/autobahn.yml
new file mode 100644
index 0000000..d98c735
--- /dev/null
+++ b/.github/workflows/autobahn.yml
@@ -0,0 +1,44 @@
+name: Autobahn
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+  schedule:
+  - cron: '0 10 * * 1' # run "At 10:00 on Monday"
+
+concurrency:
+  group: autobahn-${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
+jobs:
+  test:
+    strategy:
+      matrix:
+        os: [ ubuntu-latest ]
+        go: [ 'stable', 'oldstable' ]
+
+    runs-on: ${{ matrix.os }}
+    steps:
+    - name: Checkout
+      uses: actions/checkout@v4
+
+    - name: Setup Go
+      uses: actions/setup-go@v5
+      with:
+        go-version: ${{ matrix.go }}
+        check-latest: true
+
+    - name: Autobahn
+      env:
+        CRYPTOGRAPHY_ALLOW_OPENSSL_102: yes
+      run: |
+        make test autobahn
+
+    - name: Autobahn Report Artifact
+      uses: actions/upload-artifact@v4
+      with:
+        name: autobahn report ${{ matrix.go }} ${{ matrix.os }}
+        path: autobahn/report
+        retention-days: 7
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 5baa09b..4c55391 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -45,20 +45,3 @@ jobs:
     - name: Test
       run: |
         go test -v -race -shuffle=on -cover ./...
-
-    - name: Autobahn
-      if: >-
-        startsWith(matrix.os, 'ubuntu')
-      env:
-        CRYPTOGRAPHY_ALLOW_OPENSSL_102: yes
-      run: |
-        make test autobahn
-
-    - name: Autobahn Report Artifact
-      if: >-
-        startsWith(matrix.os, 'ubuntu')
-      uses: actions/upload-artifact@v4
-      with:
-        name: autobahn report ${{ matrix.go }} ${{ matrix.os }}
-        path: autobahn/report
-        retention-days: 7