mirror of
https://github.com/laosb/SwiftTailwind.git
synced 2025-11-28 22:01:38 +00:00
65 lines
1.6 KiB
YAML
65 lines
1.6 KiB
YAML
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 }}-spm-${{ matrix.swift-version }}-${{ hashFiles('**/Package.resolved') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-spm-${{ matrix.swift-version }}-
|
|
${{ runner.os }}-spm-
|
|
|
|
- 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 }}-spm-${{ matrix.swift-version }}-${{ hashFiles('**/Package.resolved') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-spm-${{ matrix.swift-version }}-
|
|
${{ runner.os }}-spm-
|
|
|
|
- name: Build package
|
|
run: swift build --verbose
|
|
|
|
- name: Run tests
|
|
run: swift test --verbose
|