mirror of
https://github.com/samsonjs/Peekaboo.git
synced 2026-03-25 09:25:47 +00:00
68 lines
No EOL
1.3 KiB
YAML
68 lines
No EOL
1.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: macos-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [20.x, 22.x]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build TypeScript
|
|
run: npm run build
|
|
|
|
- name: Run linter
|
|
run: npm run lint --if-present
|
|
|
|
- name: Run tests with coverage
|
|
run: npm run test:coverage
|
|
env:
|
|
CI: true
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v4
|
|
if: matrix.node-version == '20.x'
|
|
with:
|
|
file: ./coverage/lcov.info
|
|
flags: unittests
|
|
name: codecov-umbrella
|
|
fail_ci_if_error: false
|
|
|
|
build-swift:
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Swift
|
|
uses: swift-actions/setup-swift@v2
|
|
with:
|
|
swift-version: "6.0"
|
|
|
|
- name: Build Swift CLI
|
|
run: |
|
|
cd peekaboo-cli
|
|
swift build -c release
|
|
|
|
- name: Run Swift tests
|
|
run: |
|
|
cd peekaboo-cli
|
|
swift test |