Skip to content

Fix formatting (use swiftformat, not swift-format) #163

Fix formatting (use swiftformat, not swift-format)

Fix formatting (use swiftformat, not swift-format) #163

Workflow file for this run

name: test
on:
push:
branches: ['**']
tags: ['**']
pull_request:
jobs:
# Linux - runs on every push
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout html5lib-tests
uses: actions/checkout@v4
with:
repository: html5lib/html5lib-tests
path: html5lib-tests
- name: Setup Swift
uses: swift-actions/setup-swift@v2
with:
swift-version: "6.0"
- name: Build
run: swift build
- name: Run tests
run: swift test
# macOS - only runs on tag pushes (releases)
macos:
runs-on: macos-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: Checkout html5lib-tests
uses: actions/checkout@v4
with:
repository: html5lib/html5lib-tests
path: html5lib-tests
- name: Build
run: swift build
- name: Run tests
run: swift test
# Lint - runs on every push (Linux)
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install swiftformat
run: |
wget -q https://github.com/nicklockwood/SwiftFormat/releases/download/0.58.7/swiftformat_linux.zip
unzip -q swiftformat_linux.zip
chmod +x swiftformat_linux
sudo mv swiftformat_linux /usr/local/bin/swiftformat
- name: Lint
run: swiftformat --lint . --reporter github-actions-log