Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic implementation #2

Merged
merged 3 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .devcontainer/devcontainer.json

This file was deleted.

1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
lib/
dist/
node_modules/
coverage/
4 changes: 4 additions & 0 deletions .github/fixtures/Test.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Foundation

// TODO: trigger linter warning

Check warning on line 3 in .github/fixtures/Test.swift

View workflow job for this annotation

GitHub Actions / Integration test

Todo (todo)

TODOs should be resolved (trigger linter warning)

Check warning on line 3 in .github/fixtures/Test.swift

View workflow job for this annotation

GitHub Actions / Integration test

Todo (todo)

TODOs should be resolved (trigger linter warning)
print("Test!")
4 changes: 0 additions & 4 deletions .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
env:
node: true
es6: true
jest: true

globals:
Atomics: readonly
Expand All @@ -11,7 +10,6 @@ ignorePatterns:
- '!.*'
- '**/node_modules/.*'
- '**/dist/.*'
- '**/coverage/.*'
- '*.json'

parser: '@typescript-eslint/parser'
Expand All @@ -24,15 +22,13 @@ parserOptions:
- './tsconfig.json'

plugins:
- jest
- '@typescript-eslint'

extends:
- eslint:recommended
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
- plugin:github/recommended
- plugin:jest/recommended

rules:
{
Expand Down
18 changes: 0 additions & 18 deletions .github/linters/.markdown-lint.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .github/linters/.yaml-lint.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/linters/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"compilerOptions": {
"noEmit": true
},
"include": ["../../__tests__/**/*", "../../src/**/*"],
"exclude": ["../../dist", "../../node_modules", "../../coverage", "*.json"]
"include": ["../../src/**/*"],
"exclude": ["../../dist", "../../node_modules", "*.json"]
}
72 changes: 0 additions & 72 deletions .github/workflows/check-dist.yml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/ci.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/linter.yml

This file was deleted.

81 changes: 81 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
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
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm

- name: Install dependencies
run: npm ci

- name: Check format
run: npm run format:check

- name: Lint
run: npm run lint

check-dist:
name: Check dist/
runs-on: ghcr.io/cirruslabs/ubuntu-runner-arm64:22.04-md

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm

- name: Install dependencies
run: npm ci

- name: Build dist/
id: build
run: npm run bundle

- name: Find differences
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
edigaryev marked this conversation as resolved.
Show resolved Hide resolved

steps:
- name: 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
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.6.0
20.13
Loading