Skip to content

Commit

Permalink
ci: 🎡 allow tn-p1 workflow_dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
abcfy2 committed Jul 11, 2022
1 parent def4026 commit 8f9f165
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 7 deletions.
36 changes: 29 additions & 7 deletions .github/workflows/tn-p1.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: "tn-p1"

on:
push:
branches:
- main
pull_request:
branches:
- "*"
workflow_call:
workflow_dispatch:
inputs:
attestation_ver:
description: "Specific org.tokenscript:attestation version"
required: false
type: string
use_github_packages:
description: "Whether to use github packages for building"
required: false
default: false
type: boolean

jobs:
tn-p1:
Expand All @@ -18,7 +24,23 @@ jobs:
node-version: 16
cache: "npm"
cache-dependency-path: package-lock.json
- run: npm ci
- name: install dependencies
run: |
npm ci
if [ "${USE_GITHUB_PACKAGES}" = "true" ]; then
echo "//npm.pkg.github.com/:_authToken=${GPR_KEY}" >> .npmrc
echo "@tokenscript:registry=https://npm.pkg.github.com" >> .npmrc
cat .npmrc
fi
if [ -n "${ATTESTATION_VER}" ]; then
npm i -E "@tokenscript/attestation@${ATTESTATION_VER}"
cat package.json
fi
env:
ATTESTATION_VER: ${{ inputs.attestation_ver }}
USE_GITHUB_PACKAGES: ${{ inputs.use_github_packages }}
GPR_USER: ${{ secrets.GPR_USER }}
GPR_KEY: ${{ secrets.GPR_KEY }}
- name: build
run: npm run build
- name: test
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/tn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Token Negotiator CI"

on:
push:
branches:
- main
pull_request:
branches:
- "*"

jobs:
tn-p1:
uses: ./.github/workflows/tn-p1.yml

3 comments on commit 8f9f165

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements 36.1% 562/1557
🔴 Branches 24.55% 151/615
🔴 Functions 34.16% 83/243
🔴 Lines 35.8% 489/1366

Test suite run success

40 tests passing in 5 suites.

Report generated by 🧪jest coverage report action from 8f9f165

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements 36.1% 562/1557
🔴 Branches 24.55% 151/615
🔴 Functions 34.16% 83/243
🔴 Lines 35.8% 489/1366

Test suite run success

40 tests passing in 5 suites.

Report generated by 🧪jest coverage report action from 8f9f165

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements 36.1% 562/1557
🔴 Branches 24.55% 151/615
🔴 Functions 34.16% 83/243
🔴 Lines 35.8% 489/1366

Test suite run success

40 tests passing in 5 suites.

Report generated by 🧪jest coverage report action from 8f9f165

Please sign in to comment.