From 44fc241c347a76811a3da0b238e5cac960db3e10 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Wed, 5 Apr 2023 16:47:31 +0300 Subject: [PATCH] github: try out self-hosted runner Close #2943. Signed-off-by: Anna Shaleva --- .github/workflows/run_tests.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index bab9e99fb..e0ca409a8 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -15,7 +15,7 @@ on: jobs: lint: name: Lint - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/setup-go@v4 @@ -29,7 +29,7 @@ jobs: gomodcheck: name: Check internal dependencies - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 @@ -41,7 +41,7 @@ jobs: codeql: name: CodeQL - runs-on: ubuntu-latest + runs-on: [self-hosted, Linux, X64] strategy: fail-fast: false @@ -55,6 +55,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + # Go needs to be installed for CodeQL tool autobuild. + - uses: actions/setup-go@v4 + with: + go-version: '1.20' + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v2 @@ -86,7 +91,7 @@ jobs: test_cover: name: Coverage - runs-on: ubuntu-20.04 + runs-on: [self-hosted, Linux, X64] env: CGO_ENABLED: 0 @@ -124,10 +129,10 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, windows-2022, macos-12] + os: [ubuntu-20.04, windows-2022, macos-12, [self-hosted, Linux, X64]] go_versions: [ '1.18', '1.19', '1.20' ] exclude: - # Only latest Go version for Windows and MacOS. + # Only latest Go version for Windows, MacOS and Ubuntu. - os: windows-2022 go_versions: '1.18' - os: windows-2022 @@ -136,8 +141,12 @@ jobs: go_versions: '1.18' - os: macos-12 go_versions: '1.19' - # Exclude latest Go version for Ubuntu as Coverage uses it. - os: ubuntu-20.04 + go_versions: '1.18' + - os: ubuntu-20.04 + go_versions: '1.19' + # Exclude latest Go version for self-hosted as Coverage uses it. + - os: [self-hosted, Linux, X64] go_versions: '1.20' fail-fast: false steps: