Skip to content

Commit 0cb4fa8

Browse files
authored
Merge pull request #97 from twitter-base/next
chore(merge): Merge pull request #96 from twitter-base/dev
2 parents 14b2368 + 78a442d commit 0cb4fa8

5 files changed

Lines changed: 401 additions & 224 deletions

File tree

.github/workflows/install-build-test.node.yml

Lines changed: 0 additions & 147 deletions
This file was deleted.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Install, Build, Test [@nodejs]
2+
on: [push, pull_request, pull_request_target, create, fork, release]
3+
jobs:
4+
install-build-test_node:
5+
name: Install, Build, Test - ${{ matrix.pm }}(${{ matrix.node }})
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
node: [ '14', '12', '10' ]
10+
pm: [ 'yarn', 'npm' ]
11+
steps:
12+
- name: Dump GitHub context
13+
env:
14+
GITHUB_CONTEXT: ${{ toJson(github) }}
15+
run: echo "$GITHUB_CONTEXT"
16+
- name: Dump job context
17+
env:
18+
JOB_CONTEXT: ${{ toJson(job) }}
19+
run: echo "$JOB_CONTEXT"
20+
- name: Dump steps context
21+
env:
22+
STEPS_CONTEXT: ${{ toJson(steps) }}
23+
run: echo "$STEPS_CONTEXT"
24+
- name: Dump runner context
25+
env:
26+
RUNNER_CONTEXT: ${{ toJson(runner) }}
27+
run: echo "$RUNNER_CONTEXT"
28+
- name: Dump strategy context
29+
env:
30+
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
31+
run: echo "$STRATEGY_CONTEXT"
32+
- name: Dump matrix context
33+
env:
34+
MATRIX_CONTEXT: ${{ toJson(matrix) }}
35+
run: echo "$MATRIX_CONTEXT"
36+
- name: Checkout repository
37+
uses: actions/checkout@v2
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v2-beta
40+
with:
41+
node-version: ${{ matrix.node }}
42+
check-latest: true
43+
- name: Install dependencies
44+
run: ${{ matrix.pm }} install #--immutable --immutable-cache --check-cache
45+
- name: Build target
46+
run: ${{ matrix.pm }} build
47+
- name: Test code
48+
run: ${{ matrix.pm }} test

.github/workflows/pr.check.base-branch.yml

Lines changed: 97 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,44 @@
11
name: Check Base-Branch [pr]
22
on: [ pull_request, pull_request_target, pull_request_review_comment, pull_request_review ]
33
jobs:
4-
check_base-branch:
5-
name: Check-fix invalid head=>base pairs
4+
check_base-branch_dev:
5+
name: Check-fix invalid head=>base pairs (dev)
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Dump GitHub context
9+
env:
10+
GITHUB_CONTEXT: ${{ toJson(github) }}
11+
run: echo "$GITHUB_CONTEXT"
12+
- name: Dump job context
13+
env:
14+
JOB_CONTEXT: ${{ toJson(job) }}
15+
run: echo "$JOB_CONTEXT"
16+
- name: Dump steps context
17+
env:
18+
STEPS_CONTEXT: ${{ toJson(steps) }}
19+
run: echo "$STEPS_CONTEXT"
20+
- name: Dump runner context
21+
env:
22+
RUNNER_CONTEXT: ${{ toJson(runner) }}
23+
run: echo "$RUNNER_CONTEXT"
24+
- name: Dump strategy context
25+
env:
26+
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
27+
run: echo "$STRATEGY_CONTEXT"
28+
- name: Dump matrix context
29+
env:
30+
MATRIX_CONTEXT: ${{ toJson(matrix) }}
31+
run: echo "$MATRIX_CONTEXT"
32+
- if: github.ref == 'refs/heads/dev' || github.head_ref == 'dev' || github.head.ref == 'dev' || github.event.pull_request.head.ref == 'dev'
33+
name: Check base-branch(dev) - main=>next (FORCE)
34+
uses: dezren39/check-base-branch-action@v2
35+
with:
36+
protected-branches: "main"
37+
default-branch: "next"
38+
update-branch: true
39+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
40+
check_base-branch_next:
41+
name: Check-fix invalid head=>base pairs (next)
642
runs-on: ubuntu-latest
743
steps:
844
- name: Dump GitHub context
@@ -29,31 +65,79 @@ jobs:
2965
env:
3066
MATRIX_CONTEXT: ${{ toJson(matrix) }}
3167
run: echo "$MATRIX_CONTEXT"
32-
- if: github.ref == 'refs/heads/dev' || github.head_ref == 'dev' || github.head.ref == 'dev'
33-
name: Check base-branch(dev) - main=>next (FORCE)
34-
uses: dezren39/check-base-branch-action@v2
35-
with:
36-
protected-branches: "main"
37-
default-branch: "next"
38-
update-branch: true
39-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
40-
- if: github.ref == 'refs/heads/next' || github.head_ref == 'next' || github.head.ref == 'next'
68+
- if: github.ref == 'refs/heads/next' || github.head_ref == 'next' || github.head.ref == 'next' || github.event.pull_request.head.ref == 'next'
4169
name: Check base-branch(next) - dev=>main
4270
uses: dezren39/check-base-branch-action@v2
4371
with:
4472
protected-branches: "dev"
4573
default-branch: "main"
4674
update-branch: false
4775
repo-token: "${{ secrets.GITHUB_TOKEN }}"
48-
- if: github.ref == 'refs/heads/main' || github.head_ref == 'main' || github.head.ref == 'main'
76+
check_base-branch_main:
77+
name: Check-fix invalid head=>base pairs (main)
78+
runs-on: ubuntu-latest
79+
steps:
80+
- name: Dump GitHub context
81+
env:
82+
GITHUB_CONTEXT: ${{ toJson(github) }}
83+
run: echo "$GITHUB_CONTEXT"
84+
- name: Dump job context
85+
env:
86+
JOB_CONTEXT: ${{ toJson(job) }}
87+
run: echo "$JOB_CONTEXT"
88+
- name: Dump steps context
89+
env:
90+
STEPS_CONTEXT: ${{ toJson(steps) }}
91+
run: echo "$STEPS_CONTEXT"
92+
- name: Dump runner context
93+
env:
94+
RUNNER_CONTEXT: ${{ toJson(runner) }}
95+
run: echo "$RUNNER_CONTEXT"
96+
- name: Dump strategy context
97+
env:
98+
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
99+
run: echo "$STRATEGY_CONTEXT"
100+
- name: Dump matrix context
101+
env:
102+
MATRIX_CONTEXT: ${{ toJson(matrix) }}
103+
run: echo "$MATRIX_CONTEXT"
104+
- if: github.ref == 'refs/heads/main' || github.head_ref == 'main' || github.head.ref == 'main' || github.event.pull_request.head.ref == 'main'
49105
name: Check base-branch(main) - next=>dev
50106
uses: dezren39/check-base-branch-action@v2
51107
with:
52108
protected-branches: "next"
53109
default-branch: "dev"
54110
update-branch: false
55111
repo-token: "${{ secrets.GITHUB_TOKEN }}"
56-
- if: github.ref != 'refs/heads/dev' && github.ref != 'refs/heads/next' && github.ref != 'refs/heads/main' && github.head_ref != 'dev' && github.head.ref != 'dev' && github.head_ref != 'next' && github.head.ref != 'next' && github.head_ref != 'main' && github.head.ref != 'main'
112+
check_base-branch_feature:
113+
name: Check-fix invalid head=>base pairs (feature)
114+
runs-on: ubuntu-latest
115+
steps:
116+
- name: Dump GitHub context
117+
env:
118+
GITHUB_CONTEXT: ${{ toJson(github) }}
119+
run: echo "$GITHUB_CONTEXT"
120+
- name: Dump job context
121+
env:
122+
JOB_CONTEXT: ${{ toJson(job) }}
123+
run: echo "$JOB_CONTEXT"
124+
- name: Dump steps context
125+
env:
126+
STEPS_CONTEXT: ${{ toJson(steps) }}
127+
run: echo "$STEPS_CONTEXT"
128+
- name: Dump runner context
129+
env:
130+
RUNNER_CONTEXT: ${{ toJson(runner) }}
131+
run: echo "$RUNNER_CONTEXT"
132+
- name: Dump strategy context
133+
env:
134+
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
135+
run: echo "$STRATEGY_CONTEXT"
136+
- name: Dump matrix context
137+
env:
138+
MATRIX_CONTEXT: ${{ toJson(matrix) }}
139+
run: echo "$MATRIX_CONTEXT"
140+
- if: github.ref != 'refs/heads/dev' && github.ref != 'refs/heads/next' && github.ref != 'refs/heads/main' && github.head_ref != 'dev' && github.head.ref != 'dev' && github.head_ref != 'next' && github.head.ref != 'next' && github.head_ref != 'main' && github.head.ref != 'main' || github.event.pull_request.head.ref == 'dev' || github.event.pull_request.head.ref == 'next' || github.event.pull_request.head.ref == 'main'
57141
name: Check base-branch(feature) - main,next=>dev (FORCE)
58142
uses: dezren39/check-base-branch-action@v2
59143
with:

0 commit comments

Comments
 (0)