Skip to content

Commit

Permalink
Basic implementation (#2)
Browse files Browse the repository at this point in the history
* Basic implementation

* Use `macos-runner:sonoma` instead of `macos-sonoma-xcode:latest`

Co-authored-by: Fedor Korotkov <[email protected]>

* README.md: example with a version

---------

Co-authored-by: Fedor Korotkov <[email protected]>
  • Loading branch information
edigaryev and fkorotkov authored May 15, 2024
1 parent 16a6175 commit d4634fa
Show file tree
Hide file tree
Showing 28 changed files with 6,212 additions and 5,617 deletions.
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)

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-runner:sonoma

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

0 comments on commit d4634fa

Please sign in to comment.