Skip to content

Commit 4c10bd0

Browse files
committed
Basic implementation
1 parent 16a6175 commit 4c10bd0

29 files changed

+4634
-802
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/actionlint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
self-hosted-runner:
2+
labels:
3+
- ghcr.io/cirruslabs/macos-sonoma-xcode:latest

.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/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/check-dist.yml renamed to .github/workflows/main.yml

Lines changed: 45 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,43 @@
1-
# In TypeScript actions, `dist/` is a special directory. When you reference
2-
# an action with the `uses:` property, `dist/index.js` is the code that will be
3-
# run. For this project, the `dist/index.js` file is transpiled from other
4-
# source files. This workflow ensures the `dist/` directory contains the
5-
# expected transpiled code.
6-
#
7-
# If this workflow is run from a feature branch, it will act as an additional CI
8-
# check and fail if the checked-in `dist/` directory does not match what is
9-
# expected from the build.
10-
name: Check Transpiled JavaScript
1+
name: Continuous Integration
112

123
on:
13-
pull_request:
14-
branches:
15-
- main
164
push:
17-
branches:
18-
- main
195

206
permissions:
217
contents: read
228

239
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+
id: checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
id: setup-node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version-file: .node-version
24+
cache: npm
25+
26+
- name: Install Dependencies
27+
id: npm-ci
28+
run: npm ci
29+
30+
- name: Check Format
31+
id: npm-format-check
32+
run: npm run format:check
33+
34+
- name: Lint
35+
id: npm-lint
36+
run: npm run lint
37+
2438
check-dist:
2539
name: Check dist/
26-
runs-on: ubuntu-latest
40+
runs-on: ghcr.io/cirruslabs/ubuntu-runner-arm64:22.04-md
2741

2842
steps:
2943
- name: Checkout
@@ -61,12 +75,19 @@ jobs:
6175
exit 1
6276
fi
6377
64-
# If `dist/` was different than expected, upload the expected version as a
65-
# workflow artifact.
66-
- if: ${{ failure() && steps.diff.outcome == 'failure' }}
67-
name: Upload Artifact
68-
id: upload
69-
uses: actions/upload-artifact@v4
78+
integration-test:
79+
name: Integration test
80+
runs-on: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
81+
82+
steps:
83+
- name: Checkout
84+
id: checkout
85+
uses: actions/checkout@v4
86+
87+
- name: Test SwiftLint Action (using latest SwiftLint)
88+
uses: ./
89+
90+
- name: Test SwiftLint Action (using a specific version of SwiftLint)
91+
uses: ./
7092
with:
71-
name: dist
72-
path: dist/
93+
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

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
dist/
22
node_modules/
3-
coverage/
3+
*.yml
4+
*.yaml

0 commit comments

Comments
 (0)