Skip to content

Basic implementation #2

Basic implementation

Basic implementation #2

Workflow file for this run

name: Continuous Integration
on:
push:
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ghcr.io/cirruslabs/ubuntu-runner-arm64:22.04-md
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Install Dependencies
id: npm-ci
run: npm ci
- name: Check Format
id: npm-format-check
run: npm run format:check
- name: Lint
id: npm-lint
run: npm run lint
check-dist:
name: Check dist/
runs-on: ghcr.io/cirruslabs/ubuntu-runner-arm64:22.04-md
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Install Dependencies
id: install
run: npm ci
- name: Build dist/ Directory
id: build
run: npm run bundle
# This will fail the workflow if the `dist/` directory is different than
# expected.
- name: Compare Directories
id: diff
run: |
if [ ! -d dist/ ]; then
echo "Expected dist/ directory does not exist. See status below:"
ls -la ./
exit 1
fi
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff --ignore-space-at-eol --text dist/
exit 1
fi
integration-test:
name: Integration test
runs-on: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Test SwiftLint Action (using latest SwiftLint)
uses: ./
- name: Test SwiftLint Action (using a specific version of SwiftLint)
uses: ./
with:
version: 0.55.0