Skip to content

Commit

Permalink
ci: consolidate workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
yeojz committed Aug 26, 2019
1 parent 04b57a9 commit 6baf7be
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 88 deletions.
12 changes: 7 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment (please provide any relevant information):**
- OS:
- Browser:
- Node / Yarn:
- Any frameworks:
**Details (please provide any relevant information):**

- otplib version:
- os:
- browser:
- node / yarn:
- frameworks (if any):

**Additional context**
Add any other context about the problem here.
78 changes: 78 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Build and Test
on: [push]

jobs:
test-node-8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions/setup-node@v1
name: setup node 8
with:
node-version: 8
- name: setup
run: npm run setup
env:
OTPLIB_SETUP_EXTRAS: skip
- name: build
run: npm run build
env:
OTPLIB_BUILD_BUNDLE: false
OTPLIB_BUILD_INCLUDE_BUFFER: false
OTPLIB_BUILD_COPY_META: false
- name: test
run: npm run test:node8

test-node:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10, 12]
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions/setup-node@v1
name: setup node ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}
- name: setup
run: npm run setup
env:
OTPLIB_SETUP_EXTRAS: testmodule
- name: build
run: npm run build
env:
OTPLIB_BUILD_BUNDLE: false
OTPLIB_BUILD_INCLUDE_BUFFER: false
OTPLIB_BUILD_COPY_META: false
- name: test
run: npm run test:module

test-browser:
runs-on: ubuntu-latest
needs: [test-node]
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions/setup-node@v1
name: setup node 10
with:
node-version: 10
- name: setup
run: npm run setup
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
OTPLIB_SETUP_EXTRAS: testbrowser
- name: build
run: npm run build
env:
OTPLIB_BUILD_MODULE: false
OTPLIB_BUILD_COPY_META: false
- name: test
uses: docker://buildkite/puppeteer:v1.15.0
with:
args: npm run test:browser
33 changes: 0 additions & 33 deletions .github/workflows/test-browser.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/test-module.yml

This file was deleted.

0 comments on commit 6baf7be

Please sign in to comment.