Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8461e8b

Browse files
authored
Merge pull request #8 from wearelucid/develop
Add CI with GitHub Actions
2 parents b239a10 + 52f056f commit 8461e8b

File tree

5 files changed

+34
-59
lines changed

5 files changed

+34
-59
lines changed

‎.github/workflows/main.yml‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: End-to-end tests
2+
on: [pull_request]
3+
jobs:
4+
cypress-run:
5+
runs-on: ubuntu-16.04
6+
steps:
7+
- name: Checkout
8+
uses: actions/checkout@v1
9+
- name: Use Node.js 12.x
10+
uses: actions/setup-node@v1
11+
with:
12+
node-version: 12.x
13+
- name: Cypress run
14+
uses: cypress-io/github-action@v1
15+
env:
16+
CYPRESS_baseUrl: "https://deploy-preview-${{ github.event.number }}--nuxt-netlify-functions-example.netlify.com"
17+
with:
18+
record: false
19+
wait-on: "https://deploy-preview-${{ github.event.number }}--nuxt-netlify-functions-example.netlify.com"
20+
wait-on-timeout: 90

‎.nvmrc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/dubnium
1+
12.15.0

‎README.md‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
> Heavily inspired by the [official guide](https://functions-playground.netlify.com/) and [this example](https://github.com/stefanjudis/service-party).
88
99
## Demo
10-
Live demo can be found [here](https://nuxt-netlify-functions-example.netlify.com/).
1110

11+
Live demo can be found [here](https://nuxt-netlify-functions-example.netlify.com/).
1212

1313
## Testing functions locally
14+
1415
Thanks to the [Netlify Dev](https://www.netlify.com/products/dev/) command in the Netlify CLI (`yarn global add nelitfy-cli`), you can test your functions locally with no build step involved!
1516

1617
After building the app and running `netlify dev` or `ntl dev`, you can test the functions locally by hitting the endpoint http://localhost:8888/.netlify/functions/<function-name>
1718

18-
1919
## Build Setup
2020

21-
```bash
21+
```bash
2222
# Use Node version specified in nvmrc
2323
$ nvm use
2424

@@ -36,9 +36,13 @@ $ yarn generate
3636
```
3737

3838
## Running Tests
39+
3940
Tests use the Netlify CLI to run the serverless functions locally. You'll probably be prompted to login with your Netlify account.
4041

41-
``` bash
42-
# Run tests
42+
```bash
43+
# Serve Nuxt app and Netlify functions at localhost:8888
44+
$ netlify dev
45+
46+
# Run this command in another terminal
4347
$ yarn test
44-
```
48+
```

‎package.json‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"dev": "nuxt",
99
"build": "nuxt build",
1010
"start": "nuxt start",
11-
"test": "ntl dev & wait-on http://localhost:3000 & cypress run",
12-
"testing": "cypress run",
11+
"test": "cypress open",
12+
"test:ci": "cypress run",
1313
"generate": "nuxt generate",
1414
"lint": "sass-lint -c .sass-lint.yml '**/*.scss' -v -q -i 'node_modules/**/*.scss' && eslint --ext .js,.vue --ignore-path .gitignore ."
1515
},
@@ -37,7 +37,6 @@
3737
"node-sass": "^4.11.0",
3838
"prettier": "^1.16.4",
3939
"sass-lint": "^1.12.1",
40-
"sass-loader": "^7.1.0",
41-
"wait-on": "^3.3.0"
40+
"sass-loader": "^7.1.0"
4241
}
4342
}

‎yarn.lock‎

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -733,38 +733,6 @@
733733
debug "^3.1.0"
734734
lodash.once "^4.1.1"
735735

736-
"@hapi/address@2.x.x":
737-
version "2.1.4"
738-
resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5"
739-
integrity sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==
740-
741-
"@hapi/bourne@1.x.x":
742-
version "1.3.2"
743-
resolved "https://registry.yarnpkg.com/@hapi/bourne/-/bourne-1.3.2.tgz#0a7095adea067243ce3283e1b56b8a8f453b242a"
744-
integrity sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==
745-
746-
"@hapi/hoek@8.x.x", "@hapi/hoek@^8.3.0":
747-
version "8.5.0"
748-
resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-8.5.0.tgz#2f9ce301c8898e1c3248b0a8564696b24d1a9a5a"
749-
integrity sha512-7XYT10CZfPsH7j9F1Jmg1+d0ezOux2oM2GfArAzLwWe4mE2Dr3hVjsAL6+TFY49RRJlCdJDMw3nJsLFroTc8Kw==
750-
751-
"@hapi/joi@^15.0.3":
752-
version "15.1.1"
753-
resolved "https://registry.yarnpkg.com/@hapi/joi/-/joi-15.1.1.tgz#c675b8a71296f02833f8d6d243b34c57b8ce19d7"
754-
integrity sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==
755-
dependencies:
756-
"@hapi/address" "2.x.x"
757-
"@hapi/bourne" "1.x.x"
758-
"@hapi/hoek" "8.x.x"
759-
"@hapi/topo" "3.x.x"
760-
761-
"@hapi/topo@3.x.x":
762-
version "3.1.6"
763-
resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-3.1.6.tgz#68d935fa3eae7fdd5ab0d7f953f3205d8b2bfc29"
764-
integrity sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==
765-
dependencies:
766-
"@hapi/hoek" "^8.3.0"
767-
768736
"@iarna/toml@^2.2.1", "@iarna/toml@^2.2.3":
769737
version "2.2.3"
770738
resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.3.tgz#f060bf6eaafae4d56a7dac618980838b0696e2ab"
@@ -10609,11 +10577,6 @@ rx-lite@^3.1.2:
1060910577
resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102"
1061010578
integrity sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=
1061110579

10612-
rx@^4.1.0:
10613-
version "4.1.0"
10614-
resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782"
10615-
integrity sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=
10616-
1061710580
rxjs@^5.0.0-beta.11:
1061810581
version "5.5.12"
1061910582
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.12.tgz#6fa61b8a77c3d793dbaf270bee2f43f652d741cc"
@@ -12272,17 +12235,6 @@ vuex@^3.1.2:
1227212235
resolved "https://registry.yarnpkg.com/vuex/-/vuex-3.1.2.tgz#a2863f4005aa73f2587e55c3fadf3f01f69c7d4d"
1227312236
integrity sha512-ha3jNLJqNhhrAemDXcmMJMKf1Zu4sybMPr9KxJIuOpVcsDQlTBYLLladav2U+g1AvdYDG5Gs0xBTb0M5pXXYFQ==
1227412237

12275-
wait-on@^3.3.0:
12276-
version "3.3.0"
12277-
resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-3.3.0.tgz#9940981d047a72a9544a97b8b5fca45b2170a082"
12278-
integrity sha512-97dEuUapx4+Y12aknWZn7D25kkjMk16PbWoYzpSdA8bYpVfS6hpl2a2pOWZ3c+Tyt3/i4/pglyZctG3J4V1hWQ==
12279-
dependencies:
12280-
"@hapi/joi" "^15.0.3"
12281-
core-js "^2.6.5"
12282-
minimist "^1.2.0"
12283-
request "^2.88.0"
12284-
rx "^4.1.0"
12285-
1228612238
wait-port@^0.2.2:
1228712239
version "0.2.7"
1228812240
resolved "https://registry.yarnpkg.com/wait-port/-/wait-port-0.2.7.tgz#cdb4b78e662328099b187c7bb75fe0aa9cb6eb6c"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /