diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 7b7d13d9..f9822293 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -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. diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..2548267b --- /dev/null +++ b/.github/workflows/main.yml @@ -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 diff --git a/.github/workflows/test-browser.yml b/.github/workflows/test-browser.yml deleted file mode 100644 index 7973b066..00000000 --- a/.github/workflows/test-browser.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Test - Browser -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - with: - fetch-depth: 1 - - - name: install modules - run: >- - PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true - OTPLIB_SETUP_COMMON=true - OTPLIB_SETUP_EXTRAS=testbrowser - npm run setup - - - name: build packages - run: >- - OTPLIB_BUILD_CLEAN=true - OTPLIB_BUILD_MODULE=false - OTPLIB_BUILD_BUNDLE=true - OTPLIB_BUILD_INCLUDE_BUFFER=true - OTPLIB_BUILD_COPY_META=false - npm run build - - - name: test - uses: docker://buildkite/puppeteer:v1.15.0 - with: - args: npm run test:browser - - diff --git a/.github/workflows/test-module.yml b/.github/workflows/test-module.yml deleted file mode 100644 index f53391b9..00000000 --- a/.github/workflows/test-module.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Test - Modules -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [8, 10, 12] - steps: - - uses: actions/checkout@v1 - with: - fetch-depth: 1 - - - name: setup node ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - name: install modules - run: >- - OTPLIB_SETUP_COMMON=true - OTPLIB_SETUP_EXTRAS=skip - npm run setup - - - name: install extras - if: matrix.node-version > 8 - run: >- - OTPLIB_SETUP_COMMON=false - OTPLIB_SETUP_EXTRAS=testmodule - npm run setup - - - name: build packages - run: >- - OTPLIB_BUILD_CLEAN=true - OTPLIB_BUILD_MODULE=true - OTPLIB_BUILD_BUNDLE=true - OTPLIB_BUILD_INCLUDE_BUFFER=false - OTPLIB_BUILD_COPY_META=false - npm run build - - - name: sanity test for node <= 8 - if: matrix.node-version <= 8 - run: npm run test:node8 - - - name: full test for node > 8 - if: matrix.node-version > 8 - run: npm run test:module - -