Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 33d8421

Browse files
committed
Switch to GitHub Actions
1 parent e75d2d0 commit 33d8421

File tree

3 files changed

+97
-31
lines changed

3 files changed

+97
-31
lines changed

.github/workflows/ci.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: CI
2+
on: [push, pull_request]
3+
env:
4+
NODE_VERSION_USED_FOR_DEVELOPMENT: 14
5+
jobs:
6+
lint:
7+
name: Lint source files
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout repo
11+
uses: actions/checkout@v2
12+
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
17+
18+
- name: Cache Node.js modules
19+
uses: actions/cache@v2
20+
with:
21+
path: ~/.npm
22+
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
23+
restore-keys: |
24+
${{ runner.OS }}-node-
25+
26+
- name: Install Dependencies
27+
run: npm ci
28+
29+
- name: Lint Prettier
30+
run: npm run prettier:check
31+
32+
- name: Lint ESLint
33+
run: npm run lint
34+
35+
- name: Lint Flow
36+
run: npm run check
37+
38+
coverage:
39+
name: Measure test coverage
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout repo
43+
uses: actions/checkout@v2
44+
45+
- name: Setup Node.js
46+
uses: actions/setup-node@v1
47+
with:
48+
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
49+
50+
- name: Cache Node.js modules
51+
uses: actions/cache@v2
52+
with:
53+
path: ~/.npm
54+
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
55+
restore-keys: |
56+
${{ runner.OS }}-node-
57+
58+
- name: Install Dependencies
59+
run: npm ci
60+
61+
- name: Run tests and measure code coverage
62+
run: npm run testonly:cover
63+
64+
- name: Upload coverage to Coveralls
65+
if: ${{ always() }}
66+
run: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
67+
68+
test:
69+
name: Run tests on Node v${{ matrix.node_version_to_setup }}
70+
runs-on: ubuntu-latest
71+
strategy:
72+
matrix:
73+
node_version_to_setup: [10, 12, 14]
74+
steps:
75+
- name: Checkout repo
76+
uses: actions/checkout@v2
77+
78+
- name: Setup Node.js v${{ matrix.node_version_to_setup }}
79+
uses: actions/setup-node@v1
80+
with:
81+
node-version: ${{ matrix.node_version_to_setup }}
82+
83+
- name: Cache Node.js modules
84+
uses: actions/cache@v2
85+
with:
86+
path: ~/.npm
87+
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
88+
restore-keys: |
89+
${{ runner.OS }}-node-
90+
91+
- name: Install Dependencies
92+
run: npm ci
93+
94+
- name: Run Tests
95+
run: npm run testonly

.travis.yml

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

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GraphQL HTTP Server Middleware
22

3-
[![Build Status](https://travis-ci.org/graphql/express-graphql.svg?branch=master)](https://travis-ci.org/graphql/express-graphql)
3+
[![npm version](https://badge.fury.io/js/express-graphql.svg)](https://badge.fury.io/js/express-graphql)
4+
[![Build Status](https://github.com/graphql/express-graphql/workflows/CI/badge.svg?branch=master)](https://github.com/graphql/express-graphql/actions?query=branch%3Amaster)
45
[![Coverage Status](https://coveralls.io/repos/graphql/express-graphql/badge.svg?branch=master&service=github)](https://coveralls.io/github/graphql/express-graphql?branch=master)
56

67
Create a GraphQL HTTP server with any HTTP web framework that supports connect styled middleware, including [Connect](https://github.com/senchalabs/connect) itself, [Express](https://expressjs.com) and [Restify](http://restify.com/).

0 commit comments

Comments
 (0)