-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (32 loc) · 959 Bytes
/
lint-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Lint & Test
on:
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
test:
name: Swift ${{ matrix.swift }} on ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
swift: ["6.0"]
runs-on: ${{ matrix.os }}
steps:
- name: Setup QEMU (macOS only)
if: runner.os == 'macOS'
uses: docker/actions-toolkit/.github/actions/macos-setup-qemu@19ca9ade20f5da695f76a10988d6532058575f82
- name: Setup Docker
uses: docker/setup-docker-action@v4
- name: Setup Swift
uses: swift-actions/setup-swift@v2
with:
swift-version: "${{ matrix.swift }}"
- name: Checkout Repository
uses: actions/checkout@v4
- name: Lint
run: swift format lint . -rs
- name: Run tests
run: swift test
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true