Skip to content

Commit d4634fa

Browse files
edigaryevfkorotkov
andauthored
Basic implementation (#2)
* 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]>
1 parent 16a6175 commit d4634fa

28 files changed

+6212
-5617
lines changed

.devcontainer/devcontainer.json

Lines changed: 0 additions & 41 deletions
This file was deleted.

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
lib/
22
dist/
33
node_modules/
4-
coverage/

.github/fixtures/Test.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import Foundation
2+
3+
// TODO: trigger linter warning
4+
print("Test!")

.github/linters/.eslintrc.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
env:
22
node: true
33
es6: true
4-
jest: true
54

65
globals:
76
Atomics: readonly
@@ -11,7 +10,6 @@ ignorePatterns:
1110
- '!.*'
1211
- '**/node_modules/.*'
1312
- '**/dist/.*'
14-
- '**/coverage/.*'
1513
- '*.json'
1614

1715
parser: '@typescript-eslint/parser'
@@ -24,15 +22,13 @@ parserOptions:
2422
- './tsconfig.json'
2523

2624
plugins:
27-
- jest
2825
- '@typescript-eslint'
2926

3027
extends:
3128
- eslint:recommended
3229
- plugin:@typescript-eslint/eslint-recommended
3330
- plugin:@typescript-eslint/recommended
3431
- plugin:github/recommended
35-
- plugin:jest/recommended
3632

3733
rules:
3834
{

.github/linters/.markdown-lint.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/linters/.yaml-lint.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/linters/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"compilerOptions": {
55
"noEmit": true
66
},
7-
"include": ["../../__tests__/**/*", "../../src/**/*"],
8-
"exclude": ["../../dist", "../../node_modules", "../../coverage", "*.json"]
7+
"include": ["../../src/**/*"],
8+
"exclude": ["../../dist", "../../node_modules", "*.json"]
99
}

.github/workflows/check-dist.yml

Lines changed: 0 additions & 72 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/linter.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Continuous Integration
2+
3+
on:
4+
push:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ghcr.io/cirruslabs/ubuntu-runner-arm64:22.04-md
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version-file: .node-version
22+
cache: npm
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Check format
28+
run: npm run format:check
29+
30+
- name: Lint
31+
run: npm run lint
32+
33+
check-dist:
34+
name: Check dist/
35+
runs-on: ghcr.io/cirruslabs/ubuntu-runner-arm64:22.04-md
36+
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v4
40+
41+
- name: Setup Node.js
42+
uses: actions/setup-node@v4
43+
with:
44+
node-version-file: .node-version
45+
cache: npm
46+
47+
- name: Install dependencies
48+
run: npm ci
49+
50+
- name: Build dist/
51+
id: build
52+
run: npm run bundle
53+
54+
- name: Find differences
55+
run: |
56+
if [ ! -d dist/ ]; then
57+
echo "Expected dist/ directory does not exist. See status below:"
58+
ls -la ./
59+
exit 1
60+
fi
61+
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
62+
echo "Detected uncommitted changes after build. See status below:"
63+
git diff --ignore-space-at-eol --text dist/
64+
exit 1
65+
fi
66+
67+
integration-test:
68+
name: Integration test
69+
runs-on: ghcr.io/cirruslabs/macos-runner:sonoma
70+
71+
steps:
72+
- name: Checkout
73+
uses: actions/checkout@v4
74+
75+
- name: Test SwiftLint Action (using latest SwiftLint)
76+
uses: ./
77+
78+
- name: Test SwiftLint Action (using a specific version of SwiftLint)
79+
uses: ./
80+
with:
81+
version: 0.55.0

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.6.0
1+
20.13

0 commit comments

Comments
 (0)