From 3de6b4c7c8dcfac8287a62e7caa47d917da0359b Mon Sep 17 00:00:00 2001 From: Gwynne Raskind Date: Tue, 28 May 2024 18:40:35 -0500 Subject: [PATCH] Fix CI --- .github/dependabot.yml | 11 ------- .github/workflows/test.yml | 61 ++++++++++++-------------------------- 2 files changed, 19 insertions(+), 53 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8e352f4..998a0eb 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,4 @@ version: 2 -enable-beta-ecosystems: true updates: - package-ecosystem: "github-actions" directory: "/" @@ -9,13 +8,3 @@ updates: dependencies: patterns: - "*" - - package-ecosystem: "swift" - directory: "/" - schedule: - interval: "daily" - allow: - - dependency-type: all - groups: - all-dependencies: - patterns: - - "*" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4579e0c..73e865f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,26 +22,6 @@ env: MYSQL_HOSTNAME_B: 'mysql-b' jobs: - dependency-graph: - if: ${{ github.event_name == 'push' }} - runs-on: ubuntu-latest - container: swift:jammy - permissions: - contents: write - steps: - - name: Check out code - uses: actions/checkout@v4 - - name: Fix Git configuration - run: | - git config --global --add safe.directory "${GITHUB_WORKSPACE}" - apt-get update && apt-get install -y curl - - name: Submit dependency graph - uses: vapor-community/swift-dependency-submission@v0.1 - with: - path: ${{ github.workspace }} - - api-breakage: - if: ${{ !(github.event.pull_request.draft || false) }} runs-on: ubuntu-latest container: swift:jammy steps: @@ -56,29 +36,22 @@ jobs: gh-codeql: if: ${{ !(github.event.pull_request.draft || false) }} runs-on: ubuntu-latest - container: - image: swift:5.9-jammy permissions: { actions: write, contents: read, security-events: write } - timeout-minutes: 60 + timeout-minutes: 30 steps: + - name: Install latest Swift toolchain + uses: vapor/swiftly-action@v0.1 + with: { toolchain: latest } - name: Check out code uses: actions/checkout@v4 - - name: Mark repo safe in non-fake global config - run: | - git config --global --add safe.directory "${GITHUB_WORKSPACE}" - - name: Check Swift compatibility - id: swift-check - uses: vapor/ci/.github/actions/check-compatible-swift@main + - name: Fix Git configuration + run: 'git config --global --add safe.directory "${GITHUB_WORKSPACE}"' - name: Initialize CodeQL - if: ${{ steps.swift-check.outputs.swift-compatible == 'true' }} uses: github/codeql-action/init@v3 with: { languages: swift } - name: Perform build - if: ${{ steps.swift-check.outputs.swift-compatible == 'true' }} - run: | - swift build + run: 'swift build ${PACKAGE_ROOT} ${EXTRA_FLAGS}' - name: Run CodeQL analyze - if: ${{ steps.swift-check.outputs.swift-compatible == 'true' }} uses: github/codeql-action/analyze@v3 linux-all: @@ -94,10 +67,10 @@ jobs: - percona:5.7 - percona:8 swiftver: - - swift:5.7-jammy - swift:5.8-jammy - swift:5.9-jammy - - swiftlang/swift:nightly-5.10-jammy + - swift:5.10-jammy + - swiftlang/swift:nightly-6.0-jammy - swiftlang/swift:nightly-main-jammy runs-on: ubuntu-latest container: ${{ matrix.swiftver }} @@ -115,8 +88,9 @@ jobs: - name: Run unit tests run: swift test --package-path mysql-nio --enable-code-coverage --sanitize=thread - name: Upload code coverage - uses: vapor/swift-codecov-action@v0.2 + uses: vapor/swift-codecov-action@v0.3 with: + codecov_token: ${{ secrets.CODECOV_TOKEN }} package_path: 'mysql-nio' - name: Check out mysql-kit dependent uses: actions/checkout@v4 @@ -139,18 +113,19 @@ jobs: fail-fast: false matrix: dbimage: [mysql, mariadb, percona-server] - xcode: ['~14.3', 'latest'] - macos: ['macos-13'] + macos-version: ['macos-13', 'macos-14'] include: - { username: root } - { dbimage: mariadb, username: runner } - runs-on: ${{ matrix.macos }} + - { macos-version: 'macos-13', xcode-version: '~15.2' } + - { macos-version: 'macos-14', xcode-version: 'latest' } + runs-on: ${{ matrix.macos-version }} env: { MYSQL_HOSTNAME: '127.0.0.1' } steps: - name: Select latest available Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: ${{ matrix.xcode }} + xcode-version: ${{ matrix.xcode-version }} - name: Install MySQL, setup DB and auth, and wait for server start env: FORMULA: ${{ matrix.dbimage }} @@ -171,4 +146,6 @@ jobs: - name: Run all tests run: swift test --sanitize=thread --enable-code-coverage - name: Upload code coverage - uses: vapor/swift-codecov-action@v0.2 + uses: vapor/swift-codecov-action@v0.3 + with: + codecov_token: ${{ secrets.CODECOV_TOKEN }}