Skip to content

Commit 26293ac

Browse files
ci: use github actions (#75)
1 parent f013cac commit 26293ac

File tree

13 files changed

+3837
-3393
lines changed

13 files changed

+3837
-3393
lines changed

.circleci/config.yml

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

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
ci:
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
# os: [ubuntu-latest, macos-latest, windows-latest]
18+
os: [ubuntu-latest]
19+
node: [10]
20+
21+
steps:
22+
- uses: actions/setup-node@v1
23+
with:
24+
node-version: ${{ matrix.node }}
25+
26+
- name: checkout
27+
uses: actions/checkout@master
28+
29+
- name: cache node_modules
30+
uses: actions/cache@v1
31+
with:
32+
path: node_modules
33+
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
34+
35+
- name: Install dependencies
36+
if: steps.cache.outputs.cache-hit != 'true'
37+
run: yarn
38+
39+
- name: Lint
40+
run: yarn lint
41+
42+
- name: Test
43+
run: yarn test
44+
45+
- name: Coverage
46+
uses: codecov/codecov-action@v1

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![npm version][npm-version-src]][npm-version-href]
44
[![npm downloads][npm-downloads-src]][npm-downloads-href]
5-
[![Circle CI][circle-ci-src]][circle-ci-href]
5+
[![Github Actions CI][github-actions-ci-src]][github-actions-ci-href]
66
[![Codecov][codecov-src]][codecov-href]
77
[![License][license-src]][license-href]
88

@@ -70,17 +70,17 @@ Differences between vue-analytics and the Nuxt.js implementation:
7070
Copyright (c) Nuxt Community
7171

7272
<!-- Badges -->
73-
[npm-version-src]: https://img.shields.io/npm/v/@nuxtjs/google-analytics/latest.svg?style=flat-square
73+
[npm-version-src]: https://img.shields.io/npm/v/@nuxtjs/google-analytics/latest.svg
7474
[npm-version-href]: https://npmjs.com/package/@nuxtjs/google-analytics
7575

76-
[npm-downloads-src]: https://img.shields.io/npm/dt/@nuxtjs/google-analytics.svg?style=flat-square
76+
[npm-downloads-src]: https://img.shields.io/npm/dt/@nuxtjs/google-analytics.svg
7777
[npm-downloads-href]: https://npmjs.com/package/@nuxtjs/google-analytics
7878

79-
[circle-ci-src]: https://img.shields.io/circleci/project/github/nuxt-community/analytics-module.svg?style=flat-square
80-
[circle-ci-href]: https://circleci.com/gh/nuxt-community/analytics-module
79+
[github-actions-ci-src]: https://github.com/nuxt-community/analytics-module/workflows/ci/badge.svg
80+
[github-actions-ci-href]: https://github.com/nuxt-community/analytics-module/actions?query=workflow%3Aci
8181

82-
[codecov-src]: https://img.shields.io/codecov/c/github/nuxt-community/analytics-module.svg?style=flat-square
82+
[codecov-src]: https://img.shields.io/codecov/c/github/nuxt-community/analytics-module.svg
8383
[codecov-href]: https://codecov.io/gh/nuxt-community/analytics-module
8484

85-
[license-src]: https://img.shields.io/npm/l/@nuxtjs/google-analytics.svg?style=flat-square
85+
[license-src]: https://img.shields.io/npm/l/@nuxtjs/google-analytics.svg
8686
[license-href]: https://npmjs.com/package/@nuxtjs/google-analytics

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"Matteo Gabriele <m.gabriele.dev@gmail.com>",
99
"Ricardo Gobbo de Souza <ricardogobbosouza@yahoo.com.br>"
1010
],
11+
"main": "lib/module.js",
1112
"files": [
1213
"lib"
1314
],
14-
"main": "lib/module.js",
1515
"scripts": {
1616
"lint": "eslint --ext .js,.vue .",
1717
"release": "yarn test && standard-version && git push --follow-tags && npm publish",
@@ -25,7 +25,6 @@
2525
"@commitlint/config-conventional": "latest",
2626
"@nuxtjs/eslint-config": "latest",
2727
"@nuxtjs/module-test-utils": "latest",
28-
"codecov": "latest",
2928
"eslint": "latest",
3029
"husky": "latest",
3130
"jest": "latest",

test/dev.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('dev', () => {
99
nuxt.moduleContainer.addTemplate
1010
)
1111
}
12-
({ nuxt } = (await setup(loadConfig(__dirname, 'dev'), { waitFor: 2000, beforeNuxtReady })))
12+
({ nuxt } = (await setup(loadConfig(__dirname, 'dev'), { beforeNuxtReady })))
1313
}, 60000)
1414

1515
afterAll(async () => {

test/disabled-send-hit-task.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('disabled sendHitTask', () => {
99
nuxt.moduleContainer.addTemplate
1010
)
1111
}
12-
({ nuxt } = (await setup(loadConfig(__dirname, 'disabled-send-hit-task'), { waitFor: 2000, beforeNuxtReady })))
12+
({ nuxt } = (await setup(loadConfig(__dirname, 'disabled-send-hit-task'), { beforeNuxtReady })))
1313
}, 60000)
1414

1515
afterAll(async () => {

test/disabled.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('disabled', () => {
99
nuxt.moduleContainer.addTemplate
1010
)
1111
}
12-
({ nuxt } = (await setup(loadConfig(__dirname, 'disabled'), { waitFor: 2000, beforeNuxtReady })))
12+
({ nuxt } = (await setup(loadConfig(__dirname, 'disabled'), { beforeNuxtReady })))
1313
}, 60000)
1414

1515
afterAll(async () => {

test/fixture/dev/nuxt.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
module.exports = {
22
dev: true,
33
rootDir: __dirname,
4-
render: {
5-
resourceHints: false
6-
},
74
buildModules: [
85
{ handler: require('../../../') }
96
],

test/fixture/disabled-send-hit-task/nuxt.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
module.exports = {
22
dev: true,
33
rootDir: __dirname,
4-
render: {
5-
resourceHints: false
6-
},
74
buildModules: [
85
{ handler: require('../../../') }
96
],

test/fixture/disabled/nuxt.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
module.exports = {
22
dev: true,
33
rootDir: __dirname,
4-
render: {
5-
resourceHints: false
6-
},
74
buildModules: [
85
{ handler: require('../../../') }
96
],

0 commit comments

Comments
 (0)