Skip to content

Commit 54fbfec

Browse files
authored
NXT-12459: Replace Travis CI with GitHub Actions (#262)
* NXT-12459: Replace Travis CI with GitHub Actions * Update ci-reusable.yml
1 parent da5451c commit 54fbfec

4 files changed

Lines changed: 115 additions & 48 deletions

File tree

.github/workflows/ci-branch.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- master
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ci-branch-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
branch:
18+
uses: ./.github/workflows/ci-reusable.yml
19+
with:
20+
checkout-ref: ${{ github.event.pull_request.head.sha || github.sha }}
21+
secrets: inherit
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
concurrency:
8+
group: ci-pr-${{ github.event.pull_request.number }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
pull-request:
13+
uses: ./.github/workflows/ci-reusable.yml
14+
with:
15+
checkout-ref: ''
16+
secrets: inherit

.github/workflows/ci-reusable.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI Pipeline
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
checkout-ref:
7+
description: 'Git ref to checkout (empty for default merge commit)'
8+
type: string
9+
required: false
10+
default: ''
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: ['lts/*', 'node']
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
with:
24+
ref: ${{ inputs.checkout-ref || github.ref }}
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
31+
- name: Clone and setup Enact CLI
32+
run: |
33+
git clone --branch=develop --depth 1 https://github.com/enactjs/cli ../cli
34+
pushd ../cli
35+
npm install
36+
npm link
37+
popd
38+
39+
- name: Install project dependencies
40+
run: npm install
41+
42+
- name: Run ESLint
43+
run: npm run lint
44+
45+
- name: Starting agate/all-samples build
46+
run: |
47+
cd agate/all-samples
48+
npm install
49+
npm run pack
50+
cd ../../
51+
52+
- name: Starting moonstone/all-samples build
53+
run: |
54+
cd moonstone/all-samples
55+
npm install
56+
npm run pack
57+
cd ../../
58+
59+
- name: Starting sandstone/all-samples build
60+
run: |
61+
cd sandstone/all-samples
62+
npm install
63+
npm run pack
64+
cd ../../
65+
66+
- name: Starting ui/all-samples build
67+
run: |
68+
cd ui/all-samples
69+
npm install
70+
npm run pack
71+
cd ../../
72+
73+
- name: Starting my-theme-app build
74+
run: |
75+
cd my-theme-app
76+
npm install
77+
npm run pack
78+
cd ../../

.travis.yml

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

0 commit comments

Comments
 (0)