generated from kurone-kito/yarn-project-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (60 loc) · 1.72 KB
/
push-feature.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: The CI workflow on push as a feature branch
run-name: Push the feature branch by @${{ github.actor }}
on:
push:
branches:
- '*'
- '!main'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
build:
defaults:
run:
shell: ${{ matrix.platform.shell }}
name: The build process
runs-on: ${{ matrix.platform.os }}
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Stages the pushed branch
uses: actions/checkout@v4
- name: Pre-prepare the Node.js version ${{ matrix.node-version }} environment
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Enable the corepack because of the Yarn berry
run: corepack enable
- name: Post-prepare the Node.js version ${{ matrix.node-version }} environment
uses: actions/setup-node@v4
with:
cache: ${{ !env.ACT && 'yarn' || '' }}
node-version: ${{ matrix.node-version }}
- env:
HUSKY: 0
name: Install the dependencies
run: yarn install --inline-builds
- name: Run the build
run: yarn run build
- name: Run the tests
run: yarn run test
strategy:
matrix:
node-version:
- 18.x
- 20.x
- 21.x
platform:
- os: ubuntu-latest
shell: bash
- os: windows-latest
shell: bash
- os: windows-latest
shell: powershell
fail-fast: false
timeout-minutes: 30