File tree Expand file tree Collapse file tree 11 files changed +205
-94
lines changed Expand file tree Collapse file tree 11 files changed +205
-94
lines changed Original file line number Diff line number Diff line change 1+ /.dev
2+ /coverage
3+ /dist
4+ /lib
5+ /node_modules
6+ /.env
Original file line number Diff line number Diff line change @@ -7,13 +7,14 @@ Contributions to this project are [released](https://help.github.com/articles/gi
77## Submitting a pull request
88
991 . [ Fork] ( https://github.com/crazy-max/ghaction-import-gpg/fork ) and clone the repository
10- 2 . Configure and install the dependencies: ` yarn install `
11- 3 . Make sure the tests pass on your machine: ` yarn run test `
12- 4 . Create a new branch: ` git checkout -b my-branch-name `
13- 5 . Make your change, add tests, and make sure the tests still pass
14- 6 . Run pre-checkin: ` yarn run pre-checkin `
15- 7 . Push to your fork and [ submit a pull request] ( https://github.com/crazy-max/ghaction-import-gpg/compare )
16- 8 . Pat your self on the back and wait for your pull request to be reviewed and merged.
10+ 2 . Configure and install the dependencies locally: ` yarn install `
11+ 3 . Create a new branch: ` git checkout -b my-branch-name `
12+ 4 . Make your changes
13+ 5 . Make sure the tests pass: ` docker buildx bake test `
14+ 6 . Format code and build javascript artifacts: ` docker buildx bake pre-checkin `
15+ 7 . Validate all code has correctly formatted and built: ` docker buildx bake validate `
16+ 8 . Push to your fork and [ submit a pull request] ( https://github.com/crazy-max/ghaction-import-gpg/compare )
17+ 9 . Pat your self on the back and wait for your pull request to be reviewed and merged.
1718
1819Here are a few things you can do that will increase the likelihood of your pull request being accepted:
1920
Original file line number Diff line number Diff line change @@ -3,14 +3,13 @@ name: ci
33on :
44 schedule :
55 - cron : ' 0 10 * * *' # everyday at 10am
6- pull_request :
7- branches :
8- - master
9- - releases/v*
106 push :
117 branches :
12- - master
13- - releases/v*
8+ - ' master'
9+ - ' releases/v*'
10+ pull_request :
11+ branches :
12+ - ' master'
1413
1514jobs :
1615 armored :
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1212 - ' **.md'
1313
1414jobs :
15+ test-containerized :
16+ runs-on : ubuntu-latest
17+ steps :
18+ -
19+ name : Checkout
20+ uses : actions/checkout@v2
21+ -
22+ name : Test
23+ run : docker buildx bake test
24+
1525 test :
1626 runs-on : ${{ matrix.os }}
1727 strategy :
3444 -
3545 name : Upload coverage
3646 uses : codecov/codecov-action@v1
37- if : success()
3847 with :
3948 token : ${{ secrets.CODECOV_TOKEN }}
4049 file : ./coverage/clover.xml
Original file line number Diff line number Diff line change 1+ name : validate
2+
3+ on :
4+ push :
5+ branches :
6+ - ' master'
7+ - ' releases/v*'
8+ paths-ignore :
9+ - ' **.md'
10+ pull_request :
11+ branches :
12+ - ' master'
13+ paths-ignore :
14+ - ' **.md'
15+
16+ jobs :
17+ validate :
18+ runs-on : ubuntu-latest
19+ steps :
20+ -
21+ name : Checkout
22+ uses : actions/checkout@v2
23+ -
24+ name : Validate
25+ run : docker buildx bake validate
Original file line number Diff line number Diff line change 3535lib-cov
3636
3737# Coverage directory used by tools like istanbul
38- coverage
38+ / coverage
3939* .lcov
4040
4141# nyc test coverage
Original file line number Diff line number Diff line change 1+ #syntax=docker/dockerfile:1.2
2+
3+ FROM node:12 AS deps
4+ WORKDIR /src
5+ COPY package.json yarn.lock ./
6+ RUN --mount=type=cache,target=/src/node_modules \
7+ yarn install
8+
9+ FROM scratch AS update-yarn
10+ COPY --from=deps /src/yarn.lock /
11+
12+ FROM deps AS validate-yarn
13+ COPY .git .git
14+ RUN status=$(git status --porcelain -- yarn.lock); if [ -n "$status" ]; then echo $status; exit 1; fi
15+
16+ FROM deps AS base
17+ COPY . .
18+
19+ FROM base AS build
20+ RUN --mount=type=cache,target=/src/node_modules \
21+ yarn build
22+
23+ FROM deps AS test
24+ ARG GITHUB_REPOSITORY
25+ ENV RUNNER_TEMP=/tmp/github_runner
26+ ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache
27+ ENV GITHUB_REPOSITORY=${GITHUB_REPOSITORY}
28+ COPY . .
29+ RUN --mount=type=cache,target=/src/node_modules \
30+ yarn run test
31+
32+ FROM scratch AS test-coverage
33+ COPY --from=test /src/coverage /coverage/
34+
35+ FROM base AS run-format
36+ RUN --mount=type=cache,target=/src/node_modules \
37+ yarn run format
38+
39+ FROM scratch AS format
40+ COPY --from=run-format /src/src/*.ts /src/
41+
42+ FROM base AS validate-format
43+ RUN --mount=type=cache,target=/src/node_modules \
44+ yarn run format-check
45+
46+ FROM scratch AS dist
47+ COPY --from=build /src/dist/ /dist/
48+
49+ FROM build AS validate-build
50+ RUN status=$(git status --porcelain -- dist); if [ -n "$status" ]; then echo $status; exit 1; fi
51+
52+ FROM base AS dev
53+ ENTRYPOINT ["bash"]
You can’t perform that action at this time.
0 commit comments