Skip to content

Commit 0406e0f

Browse files
Merge pull request #179 from preactjs/github-ci
Replace Travis CI with Github Actions
2 parents 8f6f12e + 68a9010 commit 0406e0f

File tree

3 files changed

+11113
-466
lines changed

3 files changed

+11113
-466
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- '**'
8+
push:
9+
branches:
10+
- master
11+
12+
jobs:
13+
build_test:
14+
name: Build & Test
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-node@v1
19+
with:
20+
node-version: '14.x'
21+
- name: Cache node modules
22+
uses: actions/cache@v1
23+
env:
24+
cache-name: cache-node-modules
25+
with:
26+
path: ~/.npm
27+
# This uses the same name as the build-action so we can share the caches.
28+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
29+
restore-keys: |
30+
${{ runner.os }}-build-${{ env.cache-name }}-
31+
${{ runner.os }}-build-
32+
${{ runner.os }}-
33+
- run: npm ci
34+
- name: test
35+
# Not using `npm test` since it rebuilds source which npm ci has already done
36+
run: |
37+
npm run build
38+
npm run test

.travis.yml

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

0 commit comments

Comments
 (0)