Skip to content

Commit 08ae2c4

Browse files
authored
chore: improve CI by making it a workflow graph (typescript-eslint#4959)
1 parent 8cbbcc3 commit 08ae2c4

File tree

14 files changed

+234
-428
lines changed

14 files changed

+234
-428
lines changed

Diff for: .github/actions/prepare-build/action.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Prepare: Build"
2+
description: "Prepares the repo for a job by running the build"
3+
# inputs: - no inputs
4+
# outputs: - no outputs
5+
6+
runs:
7+
using: "composite"
8+
steps:
9+
- uses: actions/cache@v3
10+
id: build-cache
11+
with:
12+
path: "**/dist/**"
13+
key: ${{ runner.os }}-build-${{ github.ref }}
14+
restore-keys: |
15+
${{ runner.os }}-build-
16+
17+
# if the cache was hit - this will run in <1s
18+
- name: Build
19+
shell: bash
20+
# Website will be built by the Netlify GitHub App
21+
run: |
22+
yarn build --exclude website

Diff for: .github/actions/prepare-install/action.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "Prepare: Checkout and Install"
2+
description: "Prepares the repo for a job by checking out and installing dependencies"
3+
inputs:
4+
node-version:
5+
description: "The node version to setup"
6+
required: true
7+
# outputs: - no outputs
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
- name: echo github.ref
13+
shell: bash
14+
run: echo ${{ github.ref }}
15+
16+
- name: Use Node.js ${{ inputs.node-version }}
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: ${{ inputs.node-version }}
20+
21+
- name: Get yarn cache directory path
22+
shell: bash
23+
id: yarn-cache-dir-path
24+
run: echo "::set-output name=dir::$(yarn cache dir)"
25+
26+
- uses: actions/cache@v3
27+
id: yarn-cache
28+
with:
29+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
30+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
31+
restore-keys: |
32+
${{ runner.os }}-yarn-
33+
34+
# if the cache was hit - this will run in <1s
35+
- name: Install dependencies
36+
shell: bash
37+
run: |
38+
yarn --ignore-engines --frozen-lockfile --ignore-scripts
39+
yarn check-clean-workspace-after-install

0 commit comments

Comments
 (0)