Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynne committed May 28, 2024
1 parent 46d81b7 commit 3de6b4c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 53 deletions.
11 changes: 0 additions & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
version: 2
enable-beta-ecosystems: true
updates:
- package-ecosystem: "github-actions"
directory: "/"
Expand All @@ -9,13 +8,3 @@ updates:
dependencies:
patterns:
- "*"
- package-ecosystem: "swift"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-type: all
groups:
all-dependencies:
patterns:
- "*"
61 changes: 19 additions & 42 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand 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 }}
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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 }}

0 comments on commit 3de6b4c

Please sign in to comment.