mirror of
https://github.com/laosb/SwiftTailwind.git
synced 2025-11-28 22:01:38 +00:00
ci: Add CI workflow for Linux and macOS with Swift 6.1/6.2
This commit is contained in:
parent
8359d795eb
commit
d8ddc57a9a
1 changed files with 65 additions and 0 deletions
65
.github/workflows/ci.yml
vendored
Normal file
65
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-linux:
|
||||||
|
name: Test on Linux
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
swift-version: ["6.1", "6.2"]
|
||||||
|
container:
|
||||||
|
image: swift:${{ matrix.swift-version }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Cache Swift packages
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: .build
|
||||||
|
key: ${{ runner.os }}-swift-${{ matrix.swift-version }}-${{ hashFiles('**/Package.resolved') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-swift-${{ matrix.swift-version }}-
|
||||||
|
${{ runner.os }}-swift-
|
||||||
|
|
||||||
|
- name: Build package
|
||||||
|
run: swift build --verbose
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: swift test --verbose
|
||||||
|
|
||||||
|
test-macos:
|
||||||
|
name: Test on macOS
|
||||||
|
runs-on: macos-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
swift-version: ["6.1", "6.2"]
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Swift ${{ matrix.swift-version }}
|
||||||
|
uses: swift-actions/setup-swift@v2
|
||||||
|
with:
|
||||||
|
swift-version: ${{ matrix.swift-version }}
|
||||||
|
|
||||||
|
- name: Cache Swift packages
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: .build
|
||||||
|
key: ${{ runner.os }}-swift-${{ matrix.swift-version }}-${{ hashFiles('**/Package.resolved') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-swift-${{ matrix.swift-version }}-
|
||||||
|
${{ runner.os }}-swift-
|
||||||
|
|
||||||
|
- name: Build package
|
||||||
|
run: swift build --verbose
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: swift test --verbose
|
||||||
Loading…
Add table
Add a link
Reference in a new issue