From e97ad4902cc55b7eb2da477500c6b7d57a8b8998 Mon Sep 17 00:00:00 2001 From: Marcin Czerniak Date: Sun, 19 Feb 2023 18:42:23 +0100 Subject: [PATCH 1/9] Summary action testing --- .github/actions/summary/actions.yml | 6 ++ .github/actions/summary/index.js | 2 + .github/workflows/_build.yml | 3 + .github/workflows/_test.yml | 3 + package.json | 4 +- yarn.lock | 133 +++++++++++++++++++++++++++- 6 files changed, 149 insertions(+), 2 deletions(-) create mode 100644 .github/actions/summary/actions.yml create mode 100644 .github/actions/summary/index.js diff --git a/.github/actions/summary/actions.yml b/.github/actions/summary/actions.yml new file mode 100644 index 00000000..c28e162b --- /dev/null +++ b/.github/actions/summary/actions.yml @@ -0,0 +1,6 @@ +name: 'Hello World' +description: 'Greet someone and record the time' + +runs: + using: 'node16' + main: 'index.js' diff --git a/.github/actions/summary/index.js b/.github/actions/summary/index.js new file mode 100644 index 00000000..3540db17 --- /dev/null +++ b/.github/actions/summary/index.js @@ -0,0 +1,2 @@ +const core = require('@actions/core'); +const github = require('@actions/github'); diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml index a1fdefdb..008c4aac 100644 --- a/.github/workflows/_build.yml +++ b/.github/workflows/_build.yml @@ -47,3 +47,6 @@ jobs: configuration: ${{ inputs.configuration }} affected-projects: ${{ steps.setup.outputs.affected-projects }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Summary + uses: ./.github/actions/summary diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index 099a2c02..bda85d3a 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -40,3 +40,6 @@ jobs: # Test by nx - name: Test run: yarn nx affected --target=test + + - name: Summary + uses: ./.github/actions/summary diff --git a/package.json b/package.json index a5ad6128..6bb80959 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,8 @@ "zone.js": "~0.11.4" }, "devDependencies": { + "@actions/core": "^1.10.0", + "@actions/github": "^5.1.1", "@angular-builders/custom-webpack": "14.1.0", "@angular-devkit/build-angular": "^14.2.10", "@angular-eslint/builder": "14.4.0", @@ -129,4 +131,4 @@ "packages/*" ] } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index be892fd0..18120583 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,31 @@ # yarn lockfile v1 +"@actions/core@^1.10.0": + version "1.10.0" + resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.0.tgz#44551c3c71163949a2f06e94d9ca2157a0cfac4f" + integrity sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug== + dependencies: + "@actions/http-client" "^2.0.1" + uuid "^8.3.2" + +"@actions/github@^5.1.1": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@actions/github/-/github-5.1.1.tgz#40b9b9e1323a5efcf4ff7dadd33d8ea51651bbcb" + integrity sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g== + dependencies: + "@actions/http-client" "^2.0.1" + "@octokit/core" "^3.6.0" + "@octokit/plugin-paginate-rest" "^2.17.0" + "@octokit/plugin-rest-endpoint-methods" "^5.13.0" + +"@actions/http-client@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.0.1.tgz#873f4ca98fe32f6839462a6f046332677322f99c" + integrity sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw== + dependencies: + tunnel "^0.0.6" + "@adobe/css-tools@^4.0.1": version "4.1.0" resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.1.0.tgz#417fef4a143f4396ad0b3b4351fee21323f15aa8" @@ -2329,6 +2354,92 @@ "@nxrocks/common" "2.2.1" node-fetch "^2.6.1" +"@octokit/auth-token@^2.4.4": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36" + integrity sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g== + dependencies: + "@octokit/types" "^6.0.3" + +"@octokit/core@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.6.0.tgz#3376cb9f3008d9b3d110370d90e0a1fcd5fe6085" + integrity sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q== + dependencies: + "@octokit/auth-token" "^2.4.4" + "@octokit/graphql" "^4.5.8" + "@octokit/request" "^5.6.3" + "@octokit/request-error" "^2.0.5" + "@octokit/types" "^6.0.3" + before-after-hook "^2.2.0" + universal-user-agent "^6.0.0" + +"@octokit/endpoint@^6.0.1": + version "6.0.12" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.12.tgz#3b4d47a4b0e79b1027fb8d75d4221928b2d05658" + integrity sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA== + dependencies: + "@octokit/types" "^6.0.3" + is-plain-object "^5.0.0" + universal-user-agent "^6.0.0" + +"@octokit/graphql@^4.5.8": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.8.0.tgz#664d9b11c0e12112cbf78e10f49a05959aa22cc3" + integrity sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg== + dependencies: + "@octokit/request" "^5.6.0" + "@octokit/types" "^6.0.3" + universal-user-agent "^6.0.0" + +"@octokit/openapi-types@^12.11.0": + version "12.11.0" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.11.0.tgz#da5638d64f2b919bca89ce6602d059f1b52d3ef0" + integrity sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ== + +"@octokit/plugin-paginate-rest@^2.17.0": + version "2.21.3" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz#7f12532797775640dbb8224da577da7dc210c87e" + integrity sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw== + dependencies: + "@octokit/types" "^6.40.0" + +"@octokit/plugin-rest-endpoint-methods@^5.13.0": + version "5.16.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz#7ee8bf586df97dd6868cf68f641354e908c25342" + integrity sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw== + dependencies: + "@octokit/types" "^6.39.0" + deprecation "^2.3.1" + +"@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677" + integrity sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg== + dependencies: + "@octokit/types" "^6.0.3" + deprecation "^2.0.0" + once "^1.4.0" + +"@octokit/request@^5.6.0", "@octokit/request@^5.6.3": + version "5.6.3" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.3.tgz#19a022515a5bba965ac06c9d1334514eb50c48b0" + integrity sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A== + dependencies: + "@octokit/endpoint" "^6.0.1" + "@octokit/request-error" "^2.1.0" + "@octokit/types" "^6.16.1" + is-plain-object "^5.0.0" + node-fetch "^2.6.7" + universal-user-agent "^6.0.0" + +"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.39.0", "@octokit/types@^6.40.0": + version "6.41.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.41.0.tgz#e58ef78d78596d2fb7df9c6259802464b5f84a04" + integrity sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg== + dependencies: + "@octokit/openapi-types" "^12.11.0" + "@oozcitak/dom@1.15.10": version "1.15.10" resolved "https://registry.yarnpkg.com/@oozcitak/dom/-/dom-1.15.10.tgz#dca7289f2b292cff2a901ea4fbbcc0a1ab0b05c2" @@ -3942,6 +4053,11 @@ batch@0.6.1: resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" integrity sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw== +before-after-hook@^2.2.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c" + integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== + big-integer@^1.6.17: version "1.6.51" resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" @@ -5133,6 +5249,11 @@ dependency-graph@^0.11.0: resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.11.0.tgz#ac0ce7ed68a54da22165a85e97a01d53f5eb2e27" integrity sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg== +deprecation@^2.0.0, deprecation@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" + integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== + destroy@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" @@ -8604,7 +8725,7 @@ node-domexception@^1.0.0: resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== -node-fetch@^2.6.1: +node-fetch@^2.6.1, node-fetch@^2.6.7: version "2.6.9" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.9.tgz#7c7f744b5cc6eb5fd404e0c7a9fec630a55657e6" integrity sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg== @@ -11600,6 +11721,11 @@ tsutils@^3.21.0: dependencies: tslib "^1.8.1" +tunnel@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" + integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" @@ -11749,6 +11875,11 @@ unique-slug@^4.0.0: dependencies: imurmurhash "^0.1.4" +universal-user-agent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" + integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== + universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" From 92ef0b5643e243f3ed560855d245f6c8f5a9ca08 Mon Sep 17 00:00:00 2001 From: Marcin Czerniak Date: Sun, 19 Feb 2023 18:49:58 +0100 Subject: [PATCH 2/9] Rename action.yml file --- .github/actions/summary/{actions.yml => action.yml} | 0 .github/actions/summary/index.js | 2 ++ 2 files changed, 2 insertions(+) rename .github/actions/summary/{actions.yml => action.yml} (100%) diff --git a/.github/actions/summary/actions.yml b/.github/actions/summary/action.yml similarity index 100% rename from .github/actions/summary/actions.yml rename to .github/actions/summary/action.yml diff --git a/.github/actions/summary/index.js b/.github/actions/summary/index.js index 3540db17..2cffc857 100644 --- a/.github/actions/summary/index.js +++ b/.github/actions/summary/index.js @@ -1,2 +1,4 @@ const core = require('@actions/core'); const github = require('@actions/github'); + +core.notice('This is notice'); From 70d8f3abcdd12070499ab80f5d5d083c5b8c119c Mon Sep 17 00:00:00 2001 From: Marcin Czerniak Date: Sun, 19 Feb 2023 18:59:19 +0100 Subject: [PATCH 3/9] Summary generation testing --- .github/actions/summary/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/actions/summary/index.js b/.github/actions/summary/index.js index 2cffc857..9c8cf6b4 100644 --- a/.github/actions/summary/index.js +++ b/.github/actions/summary/index.js @@ -2,3 +2,17 @@ const core = require('@actions/core'); const github = require('@actions/github'); core.notice('This is notice'); + +(async () => { + await core.summary + .addHeading('Test Results') + .addCodeBlock(generateTestResults(), "js") + .addTable([ + [{ data: 'File', header: true }, { data: 'Result', header: true }], + ['foo.js', 'Pass '], + ['bar.js', 'Fail '], + ['test.js', 'Pass '] + ]) + .addLink('View staging deployment!', 'https://github.com') + .write(); +})(); From dd4f98ac1e3af7638fa2cfb1c559a57636390110 Mon Sep 17 00:00:00 2001 From: Marcin Czerniak Date: Sun, 19 Feb 2023 19:02:34 +0100 Subject: [PATCH 4/9] Summary generation testing --- .github/actions/summary/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/summary/index.js b/.github/actions/summary/index.js index 9c8cf6b4..c01a6149 100644 --- a/.github/actions/summary/index.js +++ b/.github/actions/summary/index.js @@ -6,7 +6,7 @@ core.notice('This is notice'); (async () => { await core.summary .addHeading('Test Results') - .addCodeBlock(generateTestResults(), "js") + .addCodeBlock('console.log("sample code block")', "js") .addTable([ [{ data: 'File', header: true }, { data: 'Result', header: true }], ['foo.js', 'Pass '], From e8e850c5d01d41d94e4518ba487cd378f1a84e80 Mon Sep 17 00:00:00 2001 From: Marcin Czerniak Date: Sun, 19 Feb 2023 19:08:06 +0100 Subject: [PATCH 5/9] Summary generation testing --- .github/actions/summary/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/summary/index.js b/.github/actions/summary/index.js index c01a6149..48b67c85 100644 --- a/.github/actions/summary/index.js +++ b/.github/actions/summary/index.js @@ -1,6 +1,8 @@ const core = require('@actions/core'); const github = require('@actions/github'); +const successMark = ''; + core.notice('This is notice'); (async () => { @@ -9,7 +11,7 @@ core.notice('This is notice'); .addCodeBlock('console.log("sample code block")', "js") .addTable([ [{ data: 'File', header: true }, { data: 'Result', header: true }], - ['foo.js', 'Pass '], + [successMark, 'Pass '], ['bar.js', 'Fail '], ['test.js', 'Pass '] ]) From 88acda89c9d5b9f4ee952e9f46fb853ce07d6470 Mon Sep 17 00:00:00 2001 From: Marcin Czerniak Date: Sun, 19 Feb 2023 19:35:19 +0100 Subject: [PATCH 6/9] Details test --- .github/actions/summary/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/summary/index.js b/.github/actions/summary/index.js index 48b67c85..4f99d254 100644 --- a/.github/actions/summary/index.js +++ b/.github/actions/summary/index.js @@ -1,7 +1,7 @@ const core = require('@actions/core'); const github = require('@actions/github'); -const successMark = ''; +const successMark = '✅'; core.notice('This is notice'); @@ -15,6 +15,7 @@ core.notice('This is notice'); ['bar.js', 'Fail '], ['test.js', 'Pass '] ]) + .addDetails('Details', 'This is details') .addLink('View staging deployment!', 'https://github.com') .write(); })(); From 5cec8032996c1a8419cf2d103cb4b33c2acfa2ca Mon Sep 17 00:00:00 2001 From: Marcin Czerniak Date: Sun, 19 Feb 2023 20:10:45 +0100 Subject: [PATCH 7/9] Table generation test --- .github/actions/summary/index.js | 98 +++++++++++++++++++++++++++++--- 1 file changed, 89 insertions(+), 9 deletions(-) diff --git a/.github/actions/summary/index.js b/.github/actions/summary/index.js index 4f99d254..03a4fdf1 100644 --- a/.github/actions/summary/index.js +++ b/.github/actions/summary/index.js @@ -2,20 +2,100 @@ const core = require('@actions/core'); const github = require('@actions/github'); const successMark = '✅'; +const skippedMark = '⏭️'; +const failureMark = '❌'; -core.notice('This is notice'); +const headerTitles = [ + 'Package', + 'Build', + 'Test', + 'Tests passed', + 'Tests failed', + 'Tests skipped', + 'Cache' +]; + +const data = { + "packages": { + "client": { + "build": { + "status": "success", + "fetchedFromCache": false, + }, + "test": { + "status": "success", + "fetchedFromCache": false, + "tests": { + "total": 100, + "passed": 100, + "failed": 0, + "skipped": 0, + }, + }, + }, + "server": { + "build": { + "status": "success", + "fetchedFromCache": false, + }, + "test": { + "status": "success", + "fetchedFromCache": false, + "tests": { + "total": 100, + "passed": 100, + "failed": 0, + "skipped": 0, + }, + }, + }, + "proto": { + "build": { + "status": "success", + "fetchedFromCache": false, + }, + "test": { + "status": "success", + "fetchedFromCache": false, + "tests": { + "total": 100, + "passed": 100, + "failed": 0, + "skipped": 0, + }, + }, + } + } +}; + +function getMark(status) { + if (status === 'success') { + return successMark; + } else if (status === 'skipped') { + return skippedMark; + } else { + return failureMark; + } +} + +function generateTableRow(packageName, data) { + return [ + packageName, + getMark(data.build), + getMark(data.test), + data.test.tests.passed, + data.test.tests.failed, + data.test.tests.skipped, + data.build.fetchedFromCache ? 'yes' : 'no', + ] +} (async () => { await core.summary - .addHeading('Test Results') - .addCodeBlock('console.log("sample code block")', "js") + .addHeading('Action results') .addTable([ - [{ data: 'File', header: true }, { data: 'Result', header: true }], - [successMark, 'Pass '], - ['bar.js', 'Fail '], - ['test.js', 'Pass '] + headerTitles.map(title => ({ data: title, header: true })), + ...Object.entries(data.packages).map(([packageName, data]) => generateTableRow(packageName, data)) ]) - .addDetails('Details', 'This is details') - .addLink('View staging deployment!', 'https://github.com') .write(); })(); From bee80bf854c658274e6ce6b59b8ce65be0455409 Mon Sep 17 00:00:00 2001 From: Marcin Czerniak Date: Sun, 19 Feb 2023 20:13:32 +0100 Subject: [PATCH 8/9] Table generation test --- .github/actions/summary/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/summary/index.js b/.github/actions/summary/index.js index 03a4fdf1..aa1a6d68 100644 --- a/.github/actions/summary/index.js +++ b/.github/actions/summary/index.js @@ -81,11 +81,11 @@ function getMark(status) { function generateTableRow(packageName, data) { return [ packageName, - getMark(data.build), - getMark(data.test), - data.test.tests.passed, - data.test.tests.failed, - data.test.tests.skipped, + getMark(data.build.status), + getMark(data.test.status), + `${data.test.tests.passed}`, + `${data.test.tests.failed}`, + `${data.test.tests.skipped}`, data.build.fetchedFromCache ? 'yes' : 'no', ] } From f3ed2f412796c0bf038b1509ecaa2ef77658d38f Mon Sep 17 00:00:00 2001 From: Marcin Czerniak Date: Tue, 21 Feb 2023 19:38:39 +0100 Subject: [PATCH 9/9] extractor tests --- .github/actions/summary/extractor.js | 5 +++++ .github/actions/summary/index.js | 2 ++ .github/workflows/_summary.yml | 17 +++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 .github/actions/summary/extractor.js create mode 100644 .github/workflows/_summary.yml diff --git a/.github/actions/summary/extractor.js b/.github/actions/summary/extractor.js new file mode 100644 index 00000000..22debfe7 --- /dev/null +++ b/.github/actions/summary/extractor.js @@ -0,0 +1,5 @@ +const github = require('@actions/github'); + +const octokit = github.getOctokit(); + +console.log(octokit); diff --git a/.github/actions/summary/index.js b/.github/actions/summary/index.js index aa1a6d68..8c73e3f5 100644 --- a/.github/actions/summary/index.js +++ b/.github/actions/summary/index.js @@ -68,6 +68,8 @@ const data = { } }; +core.getState + function getMark(status) { if (status === 'success') { return successMark; diff --git a/.github/workflows/_summary.yml b/.github/workflows/_summary.yml new file mode 100644 index 00000000..75eb0502 --- /dev/null +++ b/.github/workflows/_summary.yml @@ -0,0 +1,17 @@ +name: Development PR checks + +on: + workflow_call: + +jobs: + summary: + runs-on: ubuntu-latest + environment: dev + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Collect client package details from logs + uses: ./.github/actions/collect-client-package-details + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}