Skip to content

Commit

Permalink
docs: updates on workflows
Browse files Browse the repository at this point in the history
Added information on documentation
  • Loading branch information
ADMSK\AVROGAL1 committed Mar 10, 2021
1 parent 50c02d9 commit f379549
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/CI.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ "10", "12", "14" ]
node: [ "12", "13", "14" ]
steps:
- uses: actions/checkout@v2

Expand All @@ -33,8 +33,6 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --pure-lockfile

- name: Install
run: yarn install

Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/auto-merge.yml
@@ -0,0 +1,16 @@
name: auto-merge

on:
pull_request:

jobs:
auto-merge:
runs-on: ubuntu-latest
if: ${{ secrets.AUTOMERGE_TOKEN }} && github.actor == 'dependabot[bot]'
steps:
- uses: ahmadnassri/action-dependabot-auto-merge@v2.3
with:
github-token: ${{ secrets.AUTOMERGE_TOKEN }}
command: "squash and merge"
approve: true
target: minor
25 changes: 25 additions & 0 deletions .github/workflows/markdown-lint.yml
@@ -0,0 +1,25 @@
name: Markdown lint (project files)

on:
pull_request:
branches:
- main
paths:
- '*.md'
- .github/workflows/markdown-lint.yml

jobs:
docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: "12"

- name: Lint markdown files
run: |
npx markdownlint-cli '*.md' -i LICENSE.md -i CODE_OF_CONDUCT.md
44 changes: 44 additions & 0 deletions .github/workflows/preview.yml
@@ -0,0 +1,44 @@
name: Preview

on:
pull_request:
paths:
- package.json
- yarn.lock
- .github/workflows/preview.yml

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup Node.js environment
uses: actions/setup-node@v2.1.4
with:
node-version: "12"

- uses: actions/cache@v2.1.4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install all node packages
run: |
npm install
- name: Run test all
run: |
npm run test:all
- name: Start development server
run: |
npm run develop &
- name: Test development server
run: |
curl --retry-connrefused --retry 5 http://localhost:3000/
curl --fail http://localhost:3000/api?url=https://raw.githubusercontent.com/plotly/plotly.js/master/test/image/mocks/0.json&width=400&height=400 > /dev/null
2 changes: 1 addition & 1 deletion tests/toBase64.test.ts
Expand Up @@ -5,7 +5,7 @@ require('https').globalAgent.options.rejectUnauthorized = false

describe('Image URL to base64 string', () => {
test('it should be a string base64', async () => {
const imageUrl = 'https://avatars1.githubusercontent.com/u/33148052?v=4'
const imageUrl = 'https://upload.wikimedia.org/wikipedia/commons/5/50/Oracle_logo.svg'
expect(await toBase64ImageUrl(imageUrl)).toMatch(new RegExp(/[A-Za-z0-9+/=]/))
})
})

1 comment on commit f379549

@vercel
Copy link

@vercel vercel bot commented on f379549 Mar 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.