Skip to content

Commit

Permalink
fix: Add a GitHub CI workflow and README badge (brainsum#57)
Browse files Browse the repository at this point in the history
* Relates to: brainsum#56.
  • Loading branch information
nfreear committed Mar 31, 2021
1 parent 7077200 commit e32ca6c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 12.x, 14.x, 15.x ]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
# - run: npm test
5 changes: 5 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Node.js CI][ci-badge]][ci]

# Cookieconsent Script

A script that displays a cookie consent message as required by EU regulation (GDPR). The plugin displays a message on the user's first visit and they have the ability to consent to different categories of cookies and services.
Expand Down Expand Up @@ -160,3 +162,6 @@ The script is being controlled mainly by a configuration object which is passed
});
</script>
```

[ci-badge]: https://github.com/brainsum/cookieconsent/actions/workflows/nodejs.yml/badge.svg
[ci]: https://github.com/brainsum/cookieconsent/actions/workflows/nodejs.yml

0 comments on commit e32ca6c

Please sign in to comment.