Skip to content

Commit 5986321

Browse files
authored
Merge pull request #14 from norio-nomura/stop-using-github-checks-api
Stop using GitHub Checks API
2 parents 3e1d57e + bf60c10 commit 5986321

36 files changed

+208
-680
lines changed

.dockerignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
.build
21
.git
3-
*.xcodeproj

.github/workflows/docker-build.yml

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,13 @@ on:
77
- '.dockerignore'
88
- '.github/workflows/docker-build.yml'
99
- 'Dockerfile'
10-
- 'Package*'
11-
- 'Sources/**'
12-
- 'Tests/**'
10+
- 'entrypoint.sh'
1311
pull_request:
1412
paths:
1513
- '.dockerignore'
1614
- '.github/workflows/docker-build.yml'
1715
- 'Dockerfile'
18-
- 'Package*'
19-
- 'Sources/**'
20-
- 'Tests/**'
16+
- 'entrypoint.sh'
2117

2218
jobs:
2319
DockerBuild:
@@ -27,3 +23,41 @@ jobs:
2723
- uses: actions/checkout@master
2824
- name: Docker Build
2925
run: docker build -t action-swiftlint .
26+
27+
- name: Exit Status on Errors
28+
run: |
29+
STATUS=$(docker run -v $(pwd):$(pwd) -w $(pwd) --rm action-swiftlint &>/dev/null; echo $?)
30+
[[ $STATUS == "2" ]]
31+
working-directory: ./test/errors
32+
shell: bash
33+
34+
- name: Exit Status on No lintable files
35+
run: |
36+
STATUS=$(docker run -v $(pwd):$(pwd) -w $(pwd) --rm action-swiftlint &>/dev/null; echo $?)
37+
[[ $STATUS == "1" ]]
38+
working-directory: ./test/no-lintable-files
39+
shell: bash
40+
41+
- name: Exit Status on Warnings
42+
run: |
43+
STATUS=$(docker run -v $(pwd):$(pwd) -w $(pwd) --rm action-swiftlint &>/dev/null; echo $?)
44+
[[ $STATUS == "0" ]]
45+
working-directory: ./test/Warnings
46+
shell: bash
47+
48+
- name: Exit Status on Warnings with `--strict`
49+
run: |
50+
STATUS=$(docker run -v $(pwd):$(pwd) -w $(pwd) --rm action-swiftlint --strict &>/dev/null; echo $?)
51+
[[ $STATUS == "3" ]]
52+
working-directory: ./test/Warnings
53+
shell: bash
54+
55+
- name: Output on Errors
56+
run: diff <(docker run -v $(pwd):$(pwd) -w $(pwd) --rm action-swiftlint|sort) expected.txt
57+
working-directory: ./test/errors
58+
shell: bash
59+
60+
- name: Output on Warnings
61+
run: diff <(docker run -v $(pwd):$(pwd) -w $(pwd) --rm action-swiftlint|sort) expected.txt
62+
working-directory: ./test/Warnings
63+
shell: bash

.github/workflows/swiftpm.yml

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

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
11
.DS_Store
2-
/.build
3-
/Packages
4-
/*.xcodeproj

.swiftlint.yml

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

Dockerfile

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,5 @@ LABEL "com.github.actions.description"="A tool to enforce Swift style and conven
99
LABEL "com.github.actions.icon"="shield"
1010
LABEL "com.github.actions.color"="orange"
1111

12-
COPY Sources action-swiftlint/Sources
13-
COPY Tests action-swiftlint/Tests
14-
COPY Package.swift README.md LICENSE action-swiftlint/
15-
16-
RUN cd action-swiftlint && \
17-
swift build --configuration release --static-swift-stdlib && \
18-
mv `swift build --configuration release --static-swift-stdlib --show-bin-path`/action-swiftlint /usr/bin && \
19-
cd .. && \
20-
rm -rf action-swiftlint
21-
22-
ENTRYPOINT ["/usr/bin/action-swiftlint"]
12+
COPY entrypoint.sh /
13+
ENTRYPOINT ["/entrypoint.sh"]

Package.swift

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

0 commit comments

Comments
 (0)