Skip to content

Adds linting to CI

Adds linting to CI #26

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- '**/*.md'
jobs:
lint:
runs-on: ubuntu-latest
container: swift:noble
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Lint
run: swift format lint --recursive --strict .
unit-tests:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
image: ["swift:6.1", "swiftlang/swift:nightly-6.2-noble"]
container:
image: ${{ matrix.image }}
steps:
- name: Install jemalloc
run: |
apt-get update
apt-get install -y libjemalloc-dev
- name: Install zstd (for swiftpm cache compression)
run: |
apt-get update -y
apt-get install -y zstd
- name: Checkout
uses: actions/checkout@v5
- name: Restore .build
id: "restore-build-cache"
uses: actions/cache@v4
with:
path: .build
key: swiftpm-build-${{ matrix.image }}-${{ hashFiles('Package.swift', 'Package.resolved') }}
restore-keys: "swiftpm-build-${{ matrix.image }}-"
- name: Test
run: |
swift test --enable-code-coverage --no-parallel