From 64427b0a919db4ad46bef5726877cb2bc29322e3 Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Fri, 14 Jan 2022 05:41:13 +0100 Subject: [PATCH] tests: auto-generated from `examples.yml` (#773) [skip ci] --- .github/examples.mjs | 40 +++++++++- source/plugins/achievements/examples.yml | 4 - source/plugins/achievements/tests.yml | 15 ---- source/plugins/activity/tests.yml | 21 ----- source/plugins/anilist/tests.yml | 62 --------------- source/plugins/base/tests.yml | 45 ----------- source/plugins/contributors/tests.yml | 15 ---- source/plugins/core/examples.yml | 0 source/plugins/core/tests.yml | 44 ----------- source/plugins/discussions/tests.yml | 5 -- source/plugins/followup/tests.yml | 12 --- source/plugins/gists/tests.yml | 5 -- source/plugins/habits/tests.yml | 31 -------- source/plugins/introduction/tests.yml | 12 --- source/plugins/isocalendar/tests.yml | 20 ----- source/plugins/languages/tests.yml | 59 -------------- source/plugins/licenses/examples.yml | 6 ++ source/plugins/licenses/tests.yml | 13 ---- source/plugins/music/examples.yml | 12 +-- source/plugins/nightscout/tests.yml | 14 ---- source/plugins/notable/tests.yml | 5 -- source/plugins/pagespeed/tests.yml | 39 ---------- source/plugins/people/tests.yml | 71 ----------------- source/plugins/poopmap/tests.yml | 5 -- source/plugins/posts/tests.yml | 15 ---- source/plugins/projects/tests.yml | 22 ------ source/plugins/reactions/tests.yml | 5 -- source/plugins/repositories/tests.yml | 6 -- source/plugins/rss/tests.yml | 9 --- source/plugins/screenshot/examples.yml | 4 + source/plugins/screenshot/tests.yml | 12 --- source/plugins/skyline/examples.yml | 4 + source/plugins/skyline/tests.yml | 29 ------- source/plugins/sponsors/tests.yml | 5 -- source/plugins/stackoverflow/tests.yml | 16 ---- source/plugins/stargazers/tests.yml | 5 -- source/plugins/starlists/tests.yml | 5 -- source/plugins/stars/tests.yml | 5 -- source/plugins/stock/README.md | 1 + source/plugins/stock/examples.yml | 1 + source/plugins/stock/tests.yml | 17 ---- source/plugins/support/tests.yml | 5 -- source/plugins/topics/tests.yml | 69 ---------------- source/plugins/traffic/examples.yml | 3 +- source/plugins/traffic/tests.yml | 6 -- source/plugins/tweets/examples.yml | 6 +- source/plugins/tweets/tests.yml | 14 ---- source/plugins/wakatime/examples.yml | 7 +- source/plugins/wakatime/tests.yml | 23 ------ tests/ci.test.js | 2 + tests/metrics.test.js | 2 +- tests/plugins/achievements/tests.yml | 16 ++++ tests/plugins/activity/tests.yml | 8 ++ tests/plugins/anilist/tests.yml | 27 +++++++ tests/plugins/base/tests.yml | 1 + tests/plugins/code/tests.yml | 7 ++ tests/plugins/contributors/tests.yml | 22 ++++++ tests/plugins/core/tests.yml | 1 + tests/plugins/discussions/tests.yml | 6 ++ tests/plugins/followup/tests.yml | 17 ++++ .../code => tests/plugins/gists}/tests.yml | 4 +- tests/plugins/habits/tests.yml | 16 ++++ tests/plugins/introduction/tests.yml | 15 ++++ tests/plugins/isocalendar/tests.yml | 11 +++ tests/plugins/languages/tests.yml | 42 ++++++++++ tests/plugins/licenses/tests.yml | 21 +++++ tests/plugins/lines/tests.yml | 6 ++ {source => tests}/plugins/music/tests.yml | 78 +++++++++---------- tests/plugins/nightscout/tests.yml | 5 ++ tests/plugins/notable/tests.yml | 12 +++ tests/plugins/pagespeed/tests.yml | 20 +++++ tests/plugins/people/tests.yml | 17 ++++ tests/plugins/poopmap/tests.yml | 4 + tests/plugins/posts/tests.yml | 14 ++++ tests/plugins/projects/tests.yml | 7 ++ tests/plugins/reactions/tests.yml | 7 ++ tests/plugins/repositories/tests.yml | 6 ++ tests/plugins/rss/tests.yml | 1 + tests/plugins/screenshot/tests.yml | 11 +++ tests/plugins/skyline/tests.yml | 11 +++ tests/plugins/sponsors/tests.yml | 11 +++ tests/plugins/stackoverflow/tests.yml | 8 ++ tests/plugins/stargazers/tests.yml | 5 ++ tests/plugins/starlists/tests.yml | 7 ++ tests/plugins/stars/tests.yml | 6 ++ tests/plugins/stock/tests.yml | 7 ++ tests/plugins/support/tests.yml | 5 ++ tests/plugins/topics/tests.yml | 13 ++++ .../lines => tests/plugins/traffic}/tests.yml | 5 +- tests/plugins/tweets/tests.yml | 15 ++++ tests/plugins/wakatime/tests.yml | 7 ++ 91 files changed, 524 insertions(+), 831 deletions(-) delete mode 100644 source/plugins/achievements/tests.yml delete mode 100644 source/plugins/activity/tests.yml delete mode 100644 source/plugins/anilist/tests.yml delete mode 100644 source/plugins/base/tests.yml delete mode 100644 source/plugins/contributors/tests.yml create mode 100644 source/plugins/core/examples.yml delete mode 100644 source/plugins/core/tests.yml delete mode 100644 source/plugins/discussions/tests.yml delete mode 100644 source/plugins/followup/tests.yml delete mode 100644 source/plugins/gists/tests.yml delete mode 100644 source/plugins/habits/tests.yml delete mode 100644 source/plugins/introduction/tests.yml delete mode 100644 source/plugins/isocalendar/tests.yml delete mode 100644 source/plugins/languages/tests.yml delete mode 100644 source/plugins/licenses/tests.yml delete mode 100644 source/plugins/nightscout/tests.yml delete mode 100644 source/plugins/notable/tests.yml delete mode 100644 source/plugins/pagespeed/tests.yml delete mode 100644 source/plugins/people/tests.yml delete mode 100644 source/plugins/poopmap/tests.yml delete mode 100644 source/plugins/posts/tests.yml delete mode 100644 source/plugins/projects/tests.yml delete mode 100644 source/plugins/reactions/tests.yml delete mode 100644 source/plugins/repositories/tests.yml delete mode 100644 source/plugins/rss/tests.yml delete mode 100644 source/plugins/screenshot/tests.yml delete mode 100644 source/plugins/skyline/tests.yml delete mode 100644 source/plugins/sponsors/tests.yml delete mode 100644 source/plugins/stackoverflow/tests.yml delete mode 100644 source/plugins/stargazers/tests.yml delete mode 100644 source/plugins/starlists/tests.yml delete mode 100644 source/plugins/stars/tests.yml delete mode 100644 source/plugins/stock/tests.yml delete mode 100644 source/plugins/support/tests.yml delete mode 100644 source/plugins/topics/tests.yml delete mode 100644 source/plugins/traffic/tests.yml delete mode 100644 source/plugins/tweets/tests.yml delete mode 100644 source/plugins/wakatime/tests.yml create mode 100644 tests/plugins/achievements/tests.yml create mode 100644 tests/plugins/activity/tests.yml create mode 100644 tests/plugins/anilist/tests.yml create mode 100644 tests/plugins/base/tests.yml create mode 100644 tests/plugins/code/tests.yml create mode 100644 tests/plugins/contributors/tests.yml create mode 100644 tests/plugins/core/tests.yml create mode 100644 tests/plugins/discussions/tests.yml create mode 100644 tests/plugins/followup/tests.yml rename {source/plugins/code => tests/plugins/gists}/tests.yml (56%) create mode 100644 tests/plugins/habits/tests.yml create mode 100644 tests/plugins/introduction/tests.yml create mode 100644 tests/plugins/isocalendar/tests.yml create mode 100644 tests/plugins/languages/tests.yml create mode 100644 tests/plugins/licenses/tests.yml create mode 100644 tests/plugins/lines/tests.yml rename {source => tests}/plugins/music/tests.yml (57%) create mode 100644 tests/plugins/nightscout/tests.yml create mode 100644 tests/plugins/notable/tests.yml create mode 100644 tests/plugins/pagespeed/tests.yml create mode 100644 tests/plugins/people/tests.yml create mode 100644 tests/plugins/poopmap/tests.yml create mode 100644 tests/plugins/posts/tests.yml create mode 100644 tests/plugins/projects/tests.yml create mode 100644 tests/plugins/reactions/tests.yml create mode 100644 tests/plugins/repositories/tests.yml create mode 100644 tests/plugins/rss/tests.yml create mode 100644 tests/plugins/screenshot/tests.yml create mode 100644 tests/plugins/skyline/tests.yml create mode 100644 tests/plugins/sponsors/tests.yml create mode 100644 tests/plugins/stackoverflow/tests.yml create mode 100644 tests/plugins/stargazers/tests.yml create mode 100644 tests/plugins/starlists/tests.yml create mode 100644 tests/plugins/stars/tests.yml create mode 100644 tests/plugins/stock/tests.yml create mode 100644 tests/plugins/support/tests.yml create mode 100644 tests/plugins/topics/tests.yml rename {source/plugins/lines => tests/plugins/traffic}/tests.yml (51%) create mode 100644 tests/plugins/tweets/tests.yml create mode 100644 tests/plugins/wakatime/tests.yml diff --git a/.github/examples.mjs b/.github/examples.mjs index b81e45ce..cb10e2c0 100644 --- a/.github/examples.mjs +++ b/.github/examples.mjs @@ -10,6 +10,7 @@ import yaml from "js-yaml" const __metrics = paths.join(paths.dirname(url.fileURLToPath(import.meta.url)), "..") const __templates = paths.join(paths.join(__metrics, "source/templates/")) const __plugins = paths.join(paths.join(__metrics, "source/plugins/")) +const __test_plugins = paths.join(paths.join(__metrics, "tests/plugins")) //Load plugins metadata const {plugins, templates} = await metadata({log:false, diff:true}) @@ -18,25 +19,62 @@ async function plugin(id) { const path = paths.join(__plugins, id) const readme = paths.join(path, "README.md") const examples = paths.join(path, "examples.yml") + const tests = paths.join(__test_plugins, id) return { readme:{ path:readme, content:`${await fs.readFile(readme)}` }, + tests:{ + dir:tests, + file:paths.join(tests, "tests.yml") + }, examples:fss.existsSync(examples) ? yaml.load(await fs.readFile(examples), "utf8") ?? [] : [], options:plugins[id].readme.table } } +const secrets = { + $regex:/\$\{\{\s*secrets\.(?\w+)\s*\}\}/, + METRICS_TOKEN:"MOCKED_TOKEN", + METRICS_BOT_TOKEN:"MOCKED_TOKEN", + PAGESPEED_TOKEN:"MOCKED_TOKEN", + SPOTIFY_TOKENS:"MOCKED_CLIENT_ID, MOCKED_CLIENT_SECRET, MOCKED_REFRESH_TOKEN", + YOUTUBE_MUSIC_TOKEN:"SAPISID=MOCKED_COOKIE; OTHER_PARAM=OTHER_VALUE;", + LASTFM_TOKEN:"MOCKED_TOKEN", + NIGHTSCOUT_URL:"https://testapp.herokuapp.com/", + WAKATIME_TOKEN:"MOCKED_TOKEN", + WAKATIME_TOKEN_NO_PROJECTS:"MOCKED_TOKEN_NO_PROJECTS", + TWITTER_TOKEN:"MOCKED_TOKEN", + RAPIDAPI_TOKEN:"MOCKED_TOKEN", +} + //Plugins for (const id of Object.keys(plugins)) { - const {examples, options, readme} = await plugin(id) + const {examples, options, readme, tests} = await plugin(id) + //Plugin readme await fs.writeFile(readme.path, readme.content .replace(/()[\s\S]*()/g, `$1\n${examples.map(({test, prod, ...step}) => ["```yaml", yaml.dump(step), "```"].join("\n")).join("\n")}\n$2`) .replace(/()[\s\S]*()/g, `$1\n${options}\n$2`) ) //Plugin tests + await fs.mkdir(tests.dir, { recursive: true }); + await fs.writeFile(tests.file, yaml.dump(examples.map(({prod, test = {}, name = "", ...step}) => { + const result = {name:`${plugins[id].name} - ${name}`, ...step, ...test} + test.with ??= {} + for (const [k, v] of Object.entries(result.with)) { + if (k in test.with) + result.with[k] = test.with[k] + if (secrets.$regex.test(v)) + result.with[k] = v.replace(secrets.$regex, secrets[v.match(secrets.$regex)?.groups?.secret]) + } + if (!result.with.base) + delete result.with.base + delete result.with.filename + return result + }))) + } //Templates diff --git a/source/plugins/achievements/examples.yml b/source/plugins/achievements/examples.yml index 580ebb57..8198cc02 100644 --- a/source/plugins/achievements/examples.yml +++ b/source/plugins/achievements/examples.yml @@ -6,8 +6,6 @@ base: "" plugin_achievements: yes plugin_achievements_only: sponsor, maintainer, octonaut - test: - timeout: 900000 - name: Compact display uses: lowlighter/metrics@latest @@ -19,5 +17,3 @@ plugin_achievements_only: polyglot, stargazer, sponsor, deployer, member, maintainer, developer, scripter, packager, explorer, infographile, manager plugin_achievements_display: compact plugin_achievements_threshold: X - test: - timeout: 900000 \ No newline at end of file diff --git a/source/plugins/achievements/tests.yml b/source/plugins/achievements/tests.yml deleted file mode 100644 index 14534c42..00000000 --- a/source/plugins/achievements/tests.yml +++ /dev/null @@ -1,15 +0,0 @@ -- name: Achievements plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_achievements: yes - timeout: 900000 - -- name: Achievements plugin (complete) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_achievements_threshold: A - plugin_achievements_secrets: no - plugin_achievements_ignored: octonaut - timeout: 900000 diff --git a/source/plugins/activity/tests.yml b/source/plugins/activity/tests.yml deleted file mode 100644 index 0f8f83ee..00000000 --- a/source/plugins/activity/tests.yml +++ /dev/null @@ -1,21 +0,0 @@ -- name: Activity plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_activity: yes - -- name: Activity plugin (filtered) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_activity: yes - plugin_activity_filter: pr, issue - -- name: Activity plugin (complete) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_activity: yes - plugin_activity_limit: 100 - plugin_activity_days: 14 - plugin_activity_filter: all diff --git a/source/plugins/anilist/tests.yml b/source/plugins/anilist/tests.yml deleted file mode 100644 index a8d64108..00000000 --- a/source/plugins/anilist/tests.yml +++ /dev/null @@ -1,62 +0,0 @@ -- name: Anilist plugin (default) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_anilist: yes - -- name: Anilist plugin (manga only) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_anilist: yes - plugin_anilist_medias: manga - -- name: Anilist plugin (anime only) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_anilist: yes - plugin_anilist_medias: anime - -- name: Anilist plugin (favorites section) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_anilist: yes - plugin_anilist_sections: favorites - -- name: Anilist plugin (watching/reading section) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_anilist: yes - plugin_anilist_sections: watching, reading - -- name: Anilist plugin (characters section) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_anilist: yes - plugin_anilist_sections: characters - -- name: Anilist plugin (additional options) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_anilist: yes - plugin_anilist_limit: 0 - plugin_anilist_limit_characters: 10 - plugin_anilist_shuffle: no - plugin_anilist_user: user - -- name: Anilist plugin (complete) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_anilist: yes - plugin_anilist_medias: manga, anime - plugin_anilist_sections: favorites, watching, reading, characters - plugin_anilist_limit: 0 - plugin_anilist_limit_characters: 22 - plugin_anilist_shuffle: no - plugin_anilist_user: user diff --git a/source/plugins/base/tests.yml b/source/plugins/base/tests.yml deleted file mode 100644 index 7bca85a9..00000000 --- a/source/plugins/base/tests.yml +++ /dev/null @@ -1,45 +0,0 @@ -- name: Base (header) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - base: header - base_header: yes # For web instance - -- name: Base (activity) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - base: activity - base_activity: yes # For web instance - -- name: Base (community) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - base: community - base_community: yes # For web instance - -- name: Base (repositories) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - base: repositories - base_repositories: yes # For web instance - -- name: Base (metadata) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - base: metadata - base_metadata: yes # For web instance - -- name: Base (complete) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - base: header, activity, community, repositories, metadata - base_header: yes # For web instance - base_activity: yes # For web instance - base_community: yes # For web instance - base_repositories: yes # For web instance - base_metadata: yes # For web instance \ No newline at end of file diff --git a/source/plugins/contributors/tests.yml b/source/plugins/contributors/tests.yml deleted file mode 100644 index 6a886ea8..00000000 --- a/source/plugins/contributors/tests.yml +++ /dev/null @@ -1,15 +0,0 @@ -#- name: Contributors plugin (default) -# uses: lowlighter/metrics@latest -# with: -# token: MOCKED_TOKEN -# plugin_contributors: yes - -#- name: Contributors plugin (complete) -# uses: lowlighter/metrics@latest -# with: -# token: MOCKED_TOKEN -# plugin_contributors: yes -# plugin_contributors_ignored: github-actions[bot] -# plugin_contributors_contributions: yes -# plugin_contributors_head: MOCKED_SHA -# plugin_contributors_base: MOCKED_SHA diff --git a/source/plugins/core/examples.yml b/source/plugins/core/examples.yml new file mode 100644 index 00000000..e69de29b diff --git a/source/plugins/core/tests.yml b/source/plugins/core/tests.yml deleted file mode 100644 index 53c47c7a..00000000 --- a/source/plugins/core/tests.yml +++ /dev/null @@ -1,44 +0,0 @@ -- name: Image output (jpeg) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - config_output: jpeg - -- name: Image output (png) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - config_output: png - -- name: Image output (json) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - config_output: json - -- name: Use twemoji - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - config_twemoji: yes - -- name: Use gemoji - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - config_gemoji: yes - -- name: Disable animations - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - config_animations: no - -- name: Community templates - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - template: "@classic" - setup_community_templates: "lowlighter/metrics@master:classic" - modes: - - action diff --git a/source/plugins/discussions/tests.yml b/source/plugins/discussions/tests.yml deleted file mode 100644 index d1a46e9a..00000000 --- a/source/plugins/discussions/tests.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: Discussions plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_discussions: yes \ No newline at end of file diff --git a/source/plugins/followup/tests.yml b/source/plugins/followup/tests.yml deleted file mode 100644 index b5efba4f..00000000 --- a/source/plugins/followup/tests.yml +++ /dev/null @@ -1,12 +0,0 @@ -- name: Follow-up plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_followup: yes - -- name: Follow-up plugin (complete) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_followup: yes - plugin_followup_sections: repositories, user \ No newline at end of file diff --git a/source/plugins/gists/tests.yml b/source/plugins/gists/tests.yml deleted file mode 100644 index cde896f8..00000000 --- a/source/plugins/gists/tests.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: Gists plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_gists: yes diff --git a/source/plugins/habits/tests.yml b/source/plugins/habits/tests.yml deleted file mode 100644 index d0407720..00000000 --- a/source/plugins/habits/tests.yml +++ /dev/null @@ -1,31 +0,0 @@ -- name: Habits plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_habits: yes - -- name: Habits plugin (charts) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_habits: yes - plugin_habits_facts: no - plugin_habits_charts: yes - plugin_habits_trim: yes - config_timezone: Europe/Paris - -- name: Habits plugin (facts) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_habits: yes - plugin_habits_facts: yes - -- name: Habits plugin (complete) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_habits: yes - plugin_habits_facts: yes - plugin_habits_charts: yes - config_timezone: Europe/Paris diff --git a/source/plugins/introduction/tests.yml b/source/plugins/introduction/tests.yml deleted file mode 100644 index 567c7158..00000000 --- a/source/plugins/introduction/tests.yml +++ /dev/null @@ -1,12 +0,0 @@ -- name: Introduction plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_introduction: yes - -- name: Introduction plugin (complete) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_introduction: yes - plugin_introduction_title: no \ No newline at end of file diff --git a/source/plugins/isocalendar/tests.yml b/source/plugins/isocalendar/tests.yml deleted file mode 100644 index 3130c74b..00000000 --- a/source/plugins/isocalendar/tests.yml +++ /dev/null @@ -1,20 +0,0 @@ -- name: Isocalendar plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_isocalendar: yes - -- name: Isocalendar plugin (half-year) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_isocalendar: yes - plugin_isocalendar_duration: half-year - - -- name: Isocalendar plugin (full-year) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_isocalendar: yes - plugin_isocalendar_duration: full-year diff --git a/source/plugins/languages/tests.yml b/source/plugins/languages/tests.yml deleted file mode 100644 index 54cf038e..00000000 --- a/source/plugins/languages/tests.yml +++ /dev/null @@ -1,59 +0,0 @@ -- name: Language plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_languages: yes - -- name: Language plugin (ignored languages) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_languages: yes - plugin_languages_ignored: html, css, dockerfile - -- name: Language plugin (skipped repositories) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_languages: yes - plugin_languages_skipped: metrics - -- name: Language plugin (custom color set) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_languages: yes - plugin_languages_colors: complementary - -- name: Language plugin (with details) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_languages: yes - plugin_languages_details: percentage - -- name: Language plugin (with threshold) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_languages: yes - plugin_languages_threshold: 2% - -- name: Language plugin (with categories) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_languages: yes - plugin_languages_categories: programming, data - -- name: Language plugin (complete) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_languages: yes - plugin_languages_ignored: html, css, dockerfile - plugin_languages_skipped: metrics - plugin_languages_colors: rainbow - plugin_languages_details: bytes-size, percentage - plugin_languages_threshold: 2% - plugin_languages_categories: programming, markup, data diff --git a/source/plugins/licenses/examples.yml b/source/plugins/licenses/examples.yml index b2c73401..2395fb3c 100644 --- a/source/plugins/licenses/examples.yml +++ b/source/plugins/licenses/examples.yml @@ -7,6 +7,10 @@ repo: metrics plugin_licenses: yes plugin_licenses_setup: npm ci + test: + timeout: 1800000 + modes: + - action - name: Licenses with open-source ratio graphs uses: lowlighter/metrics@latest @@ -20,3 +24,5 @@ plugin_licenses_setup: npm ci plugin_licenses_legal: no plugin_licenses_ratio: yes + test: + skip: true \ No newline at end of file diff --git a/source/plugins/licenses/tests.yml b/source/plugins/licenses/tests.yml deleted file mode 100644 index 7c29a0ef..00000000 --- a/source/plugins/licenses/tests.yml +++ /dev/null @@ -1,13 +0,0 @@ -#- name: Licenses plugin (complete) -# uses: lowlighter/metrics@latest -# with: -# token: MOCKED_TOKEN -# template: repository -# repo: metrics -# plugin_licenses: yes -# plugin_licenses_setup: npm ci -# plugin_licenses_ratio: yes -# plugin_licenses_legal: yes -# timeout: 1800000 -# modes: -# - action \ No newline at end of file diff --git a/source/plugins/music/examples.yml b/source/plugins/music/examples.yml index 8a9ea3d6..5c4ee485 100644 --- a/source/plugins/music/examples.yml +++ b/source/plugins/music/examples.yml @@ -25,8 +25,6 @@ plugin_music_mode: recent plugin_music_token: ${{ secrets.SPOTIFY_TOKENS }} plugin_music_limit: 2 - test: - plugin_music_token: MOCKED_CLIENT_ID, MOCKED_CLIENT_SECRET, MOCKED_REFRESH_TOKEN - name: Spotify - Top tracks uses: lowlighter/metrics@latest @@ -37,8 +35,6 @@ plugin_music_provider: spotify plugin_music_time_range: short plugin_music_top_type: tracks - test: - plugin_music_token: MOCKED_CLIENT_ID, MOCKED_CLIENT_SECRET, MOCKED_REFRESH_TOKEN - name: Spotify - Top artists uses: lowlighter/metrics@latest @@ -49,8 +45,6 @@ plugin_music_provider: spotify plugin_music_time_range: long plugin_music_top_type: artists - test: - plugin_music_token: MOCKED_CLIENT_ID, MOCKED_CLIENT_SECRET, MOCKED_REFRESH_TOKEN - name: Youtube Music - Random track from playlist uses: lowlighter/metrics@latest @@ -67,8 +61,6 @@ plugin_music: yes plugin_music_mode: recent plugin_music_provider: youtube - test: - plugin_music_token: SAPISID=MOCKED_COOKIE; OTHER_PARAM=OTHER_VALUE; - name: Last.fm - Recently listed uses: lowlighter/metrics@latest @@ -77,6 +69,4 @@ plugin_music_token: ${{ secrets.LASTFM_TOKEN }} plugin_music: yes plugin_music_provider: lastfm - plugin_music_user: RJ - test: - plugin_music_token: MOCKED_TOKEN \ No newline at end of file + plugin_music_user: RJ \ No newline at end of file diff --git a/source/plugins/nightscout/tests.yml b/source/plugins/nightscout/tests.yml deleted file mode 100644 index 9f270b72..00000000 --- a/source/plugins/nightscout/tests.yml +++ /dev/null @@ -1,14 +0,0 @@ -- name: Nightscout plugin (default) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_nightscout: yes - plugin_nightscout_url: https://testapp.herokuapp.com/ - -- name: Nightscout plugin (without graph) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_nightscout: yes - plugin_nightscout_url: https://testapp.herokuapp.com/ - plugin_nightscout_datapoints: 0 \ No newline at end of file diff --git a/source/plugins/notable/tests.yml b/source/plugins/notable/tests.yml deleted file mode 100644 index 9605e381..00000000 --- a/source/plugins/notable/tests.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: Notable plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_notable: yes \ No newline at end of file diff --git a/source/plugins/pagespeed/tests.yml b/source/plugins/pagespeed/tests.yml deleted file mode 100644 index 68225683..00000000 --- a/source/plugins/pagespeed/tests.yml +++ /dev/null @@ -1,39 +0,0 @@ -- name: PageSpeed plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_pagespeed_token: MOCKED_TOKEN - plugin_pagespeed: yes - -- name: PageSpeed plugin (different url) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_pagespeed_token: MOCKED_TOKEN - plugin_pagespeed: yes - plugin_pagespeed_url: github.com - -- name: PageSpeed plugin (detailed) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_pagespeed_token: MOCKED_TOKEN - plugin_pagespeed: yes - plugin_pagespeed_detailed: yes - -- name: PageSpeed plugin (screenshot) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_pagespeed_token: MOCKED_TOKEN - plugin_pagespeed: yes - plugin_pagespeed_screenshot: yes - -- name: PageSpeed plugin (complete) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_pagespeed_token: MOCKED_TOKEN - plugin_pagespeed: yes - plugin_pagespeed_detailed: yes - plugin_pagespeed_screenshot: yes diff --git a/source/plugins/people/tests.yml b/source/plugins/people/tests.yml deleted file mode 100644 index cf8197a6..00000000 --- a/source/plugins/people/tests.yml +++ /dev/null @@ -1,71 +0,0 @@ -- name: People plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_people: yes - -- name: People plugin (followers) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_people: yes - plugin_people_types: followers - -- name: People plugin (following) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_people: yes - plugin_people_types: following - -- name: People plugin (sponsoring) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_people: yes - plugin_people_types: sponsoring - -- name: People plugin (sponsors) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_people: yes - plugin_people_types: sponsors - -- name: People plugin (custom sponsors) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_people: yes - plugin_people_types: sponsors - plugin_people_sponsors_custom: lowlighter, octocat - -- name: People plugin (stargazers) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_people: yes - plugin_people_types: stargazers - -- name: People plugin (watchers) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_people: yes - plugin_people_types: watchers - -- name: People plugin (thanks) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_people: yes - plugin_people_types: thanks - plugin_people_thanks: lowlighter - -- name: People plugin (identicons) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_people: yes - plugin_people_identicons: yes - diff --git a/source/plugins/poopmap/tests.yml b/source/plugins/poopmap/tests.yml deleted file mode 100644 index 19915904..00000000 --- a/source/plugins/poopmap/tests.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: Poopmap plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_poopmap: yes \ No newline at end of file diff --git a/source/plugins/posts/tests.yml b/source/plugins/posts/tests.yml deleted file mode 100644 index 09f7eb7f..00000000 --- a/source/plugins/posts/tests.yml +++ /dev/null @@ -1,15 +0,0 @@ -- name: Posts plugin (dev.to) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_posts: yes - plugin_posts_source: dev.to - plugin_posts_user: lowlighter - -- name: Posts plugin (hashnode) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_posts: yes - plugin_posts_source: hashnode - plugin_posts_user: lowlighter diff --git a/source/plugins/projects/tests.yml b/source/plugins/projects/tests.yml deleted file mode 100644 index 74019e8b..00000000 --- a/source/plugins/projects/tests.yml +++ /dev/null @@ -1,22 +0,0 @@ -- name: Projects plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOCKEN - plugin_projects: yes - -- name: Projects plugin (repositories) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOCKEN - plugin_projects: yes - plugin_projects_repositories: lowlighter/metrics/projects/1 - plugin_projects_limit: 0 - -- name: Projects plugin (descriptions) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOCKEN - plugin_projects: yes - plugin_projects_repositories: lowlighter/metrics/projects/1 - plugin_projects_limit: 0 - plugin_projects_descriptions: yes diff --git a/source/plugins/reactions/tests.yml b/source/plugins/reactions/tests.yml deleted file mode 100644 index 16004690..00000000 --- a/source/plugins/reactions/tests.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: Reactions plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_reactions: yes \ No newline at end of file diff --git a/source/plugins/repositories/tests.yml b/source/plugins/repositories/tests.yml deleted file mode 100644 index 77f25749..00000000 --- a/source/plugins/repositories/tests.yml +++ /dev/null @@ -1,6 +0,0 @@ -- name: Repositories plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_repositories: yes - plugin_repositories_list: metrics \ No newline at end of file diff --git a/source/plugins/rss/tests.yml b/source/plugins/rss/tests.yml deleted file mode 100644 index bf91471b..00000000 --- a/source/plugins/rss/tests.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: Feed from hacker news - uses: lowlighter/metrics@latest - with: - filename: metrics.plugin.rss.svg - token: NOT_NEEDED - base: "" - plugin_rss: yes - plugin_rss_source: https://news.ycombinator.com/rss - plugin_rss_limit: 4 diff --git a/source/plugins/screenshot/examples.yml b/source/plugins/screenshot/examples.yml index 929a49fd..6b146aa0 100644 --- a/source/plugins/screenshot/examples.yml +++ b/source/plugins/screenshot/examples.yml @@ -8,3 +8,7 @@ plugin_screenshot_title: XKCD of the day plugin_screenshot_url: https://xkcd.com plugin_screenshot_selector: "#comic img" + test: + timeout: 1800000 + modes: + - action \ No newline at end of file diff --git a/source/plugins/screenshot/tests.yml b/source/plugins/screenshot/tests.yml deleted file mode 100644 index ebc27bd4..00000000 --- a/source/plugins/screenshot/tests.yml +++ /dev/null @@ -1,12 +0,0 @@ -- name: Screenshot plugin (default) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_screenshot: yes - plugin_screenshot_url: https://github.com - plugin_screenshot_title: Test - plugin_screenshot_selector: body - plugin_screenshot_background: no - timeout: 1800000 - modes: - - action \ No newline at end of file diff --git a/source/plugins/skyline/examples.yml b/source/plugins/skyline/examples.yml index 569c7311..deea77e0 100644 --- a/source/plugins/skyline/examples.yml +++ b/source/plugins/skyline/examples.yml @@ -7,3 +7,7 @@ plugin_skyline_year: 2020 plugin_skyline_frames: 6 plugin_skyline_quality: 1 + test: + timeout: 1800000 + modes: + - action \ No newline at end of file diff --git a/source/plugins/skyline/tests.yml b/source/plugins/skyline/tests.yml deleted file mode 100644 index 1a3746ef..00000000 --- a/source/plugins/skyline/tests.yml +++ /dev/null @@ -1,29 +0,0 @@ -- name: Skyline plugin (default) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_skyline: yes - timeout: 1800000 - modes: - - action - -- name: Skyline plugin (compatibility) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_skyline: yes - plugin_skyline_compatibility: yes - timeout: 1800000 - modes: - - action - -- name: Skyline plugin (complete) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_skyline: yes - plugin_skyline_frames: 12 - plugin_skyline_quality: 0.7 - timeout: 1800000 - modes: - - action diff --git a/source/plugins/sponsors/tests.yml b/source/plugins/sponsors/tests.yml deleted file mode 100644 index 716c1d28..00000000 --- a/source/plugins/sponsors/tests.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: Sponsors plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_sponsors: yes \ No newline at end of file diff --git a/source/plugins/stackoverflow/tests.yml b/source/plugins/stackoverflow/tests.yml deleted file mode 100644 index 4688d3d0..00000000 --- a/source/plugins/stackoverflow/tests.yml +++ /dev/null @@ -1,16 +0,0 @@ -- name: Stackoverflow plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_stackoverflow: yes - plugin_stackoverflow_user: 1 - -- name: Stackoverflow plugin (complete) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_stackoverflow: yes - plugin_stackoverflow_user: 1 - plugin_stackoverflow_sections: answers-top, answers-recent, questions-top, questions-recent - plugin_stackoverflow_limit: 2 - plugin_stackoverflow_lines: 4 \ No newline at end of file diff --git a/source/plugins/stargazers/tests.yml b/source/plugins/stargazers/tests.yml deleted file mode 100644 index ef72a882..00000000 --- a/source/plugins/stargazers/tests.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: Stargazers plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOCKEN - plugin_stargazers: yes diff --git a/source/plugins/starlists/tests.yml b/source/plugins/starlists/tests.yml deleted file mode 100644 index c978d269..00000000 --- a/source/plugins/starlists/tests.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: Starlists plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_starlists: yes \ No newline at end of file diff --git a/source/plugins/stars/tests.yml b/source/plugins/stars/tests.yml deleted file mode 100644 index 1b386390..00000000 --- a/source/plugins/stars/tests.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: Stars plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOCKEN - plugin_stars: yes diff --git a/source/plugins/stock/README.md b/source/plugins/stock/README.md index f84f876b..51b615f0 100644 --- a/source/plugins/stock/README.md +++ b/source/plugins/stock/README.md @@ -48,6 +48,7 @@ with: token: NOT_NEEDED base: '' plugin_stock: 'yes' + plugin_stock_token: ${{ secrets.RAPIDAPI_TOKEN }} plugin_stock_symbol: TSLA ``` diff --git a/source/plugins/stock/examples.yml b/source/plugins/stock/examples.yml index 205b80ee..9cdbf626 100644 --- a/source/plugins/stock/examples.yml +++ b/source/plugins/stock/examples.yml @@ -5,4 +5,5 @@ token: NOT_NEEDED base: "" plugin_stock: yes + plugin_stock_token: ${{ secrets.RAPIDAPI_TOKEN }} plugin_stock_symbol: TSLA diff --git a/source/plugins/stock/tests.yml b/source/plugins/stock/tests.yml deleted file mode 100644 index c4cf3fe7..00000000 --- a/source/plugins/stock/tests.yml +++ /dev/null @@ -1,17 +0,0 @@ -- name: Stock plugin (default) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_stock: yes - plugin_stock_token: MOCKED_TOKEN - plugin_stock_symbol: OCTO - -- name: Stock plugin (complete) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_stock: yes - plugin_stock_token: MOCKED_TOKEN - plugin_stock_symbol: OCTO - plugin_stock_duration: 5d - plugin_stock_interval: 5m \ No newline at end of file diff --git a/source/plugins/support/tests.yml b/source/plugins/support/tests.yml deleted file mode 100644 index 609c062d..00000000 --- a/source/plugins/support/tests.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: Support plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOKEN - plugin_support: yes diff --git a/source/plugins/topics/tests.yml b/source/plugins/topics/tests.yml deleted file mode 100644 index 3d355020..00000000 --- a/source/plugins/topics/tests.yml +++ /dev/null @@ -1,69 +0,0 @@ -- name: Topics plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOCKEN - plugin_topics: yes - -- name: Topics plugin (starred - starred sort) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOCKEN - plugin_topics: yes - plugin_topics_mode: starred - plugin_topics_sort: starred - -- name: Topics plugin (starred - activity sort) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOCKEN - plugin_topics: yes - plugin_topics_mode: starred - plugin_topics_sort: activity - -- name: Topics plugin (starred - stars sort) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOCKEN - plugin_topics: yes - plugin_topics_mode: starred - plugin_topics_sort: stars - -- name: Topics plugin (starred - random sort) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOCKEN - plugin_topics: yes - plugin_topics_mode: starred - plugin_topics_sort: random - -- name: Topics plugin (mastered - starred sort) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOCKEN - plugin_topics: yes - plugin_topics_mode: mastered - plugin_topics_sort: starred - -- name: Topics plugin (mastered - activity sort) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOCKEN - plugin_topics: yes - plugin_topics_mode: mastered - plugin_topics_sort: activity - -- name: Topics plugin (mastered - stars sort) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOCKEN - plugin_topics: yes - plugin_topics_mode: mastered - plugin_topics_sort: stars - -- name: Topics plugin (mastered - random sort) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOCKEN - plugin_topics: yes - plugin_topics_mode: mastered - plugin_topics_sort: random diff --git a/source/plugins/traffic/examples.yml b/source/plugins/traffic/examples.yml index 7e950cb0..0d823f8a 100644 --- a/source/plugins/traffic/examples.yml +++ b/source/plugins/traffic/examples.yml @@ -6,4 +6,5 @@ base: repositories plugin_traffic: yes prod: - token: ${{ secrets.METRICS_BOT_TOKEN }} \ No newline at end of file + with: + token: ${{ secrets.METRICS_BOT_TOKEN }} \ No newline at end of file diff --git a/source/plugins/traffic/tests.yml b/source/plugins/traffic/tests.yml deleted file mode 100644 index 8e8ba088..00000000 --- a/source/plugins/traffic/tests.yml +++ /dev/null @@ -1,6 +0,0 @@ -- name: Traffic plugin (default) - uses: lowlighter/metrics@latest - with: - token: MOCKED_TOCKEN - base: repositories - plugin_traffic: yes diff --git a/source/plugins/tweets/examples.yml b/source/plugins/tweets/examples.yml index 4d07e131..6f708e38 100644 --- a/source/plugins/tweets/examples.yml +++ b/source/plugins/tweets/examples.yml @@ -7,7 +7,8 @@ plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }} plugin_tweets_user: github prod: - user: botlighter + with: + user: botlighter - name: Latest tweets including attachments uses: lowlighter/metrics@latest @@ -19,5 +20,6 @@ plugin_tweets_attachments: yes plugin_tweets_user: github prod: - user: botlighter + with: + user: botlighter diff --git a/source/plugins/tweets/tests.yml b/source/plugins/tweets/tests.yml deleted file mode 100644 index bc1361c1..00000000 --- a/source/plugins/tweets/tests.yml +++ /dev/null @@ -1,14 +0,0 @@ -- name: Tweets plugin (default) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_tweets: yes - plugin_tweets_token: MOCKED_TOKEN - -- name: Tweets plugin (different user) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_tweets: yes - plugin_tweets_user: twitterdev - plugin_tweets_token: MOCKED_TOKEN diff --git a/source/plugins/wakatime/examples.yml b/source/plugins/wakatime/examples.yml index 27e4549a..29ebdb15 100644 --- a/source/plugins/wakatime/examples.yml +++ b/source/plugins/wakatime/examples.yml @@ -7,6 +7,7 @@ plugin_wakatime_sections: time, projects, projects-graphs, languages, languages-graphs, editors, os plugin_wakatime_token: ${{ secrets.WAKATIME_TOKEN }} prod: - # ⚠️ Using mocked data because I don't really use WakaTime, disable this - plugin_wakatime_token: MOCKED_TOKEN - use_mocked_data: yes \ No newline at end of file + # ⚠️ Using mocked data because I don't really use WakaTime + with: + plugin_wakatime_token: MOCKED_TOKEN + use_mocked_data: yes \ No newline at end of file diff --git a/source/plugins/wakatime/tests.yml b/source/plugins/wakatime/tests.yml deleted file mode 100644 index 81e96947..00000000 --- a/source/plugins/wakatime/tests.yml +++ /dev/null @@ -1,23 +0,0 @@ -- name: WakaTime plugin (default) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_wakatime_token: MOCKED_TOKEN - plugin_wakatime: yes - -- name: WakaTime plugin (complete) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_wakatime_token: MOCKED_TOKEN - plugin_wakatime: yes - plugin_wakatime_limit: 4 - plugin_wakatime_sections: time, projects, projects-graphs, languages, languages-graphs, editors, editors-graphs, os, os-graphs - -- name: WakaTime plugin (projects hidden) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_wakatime_token: MOCKED_TOKEN_NO_PROJECTS - plugin_wakatime: yes - plugin_wakatime_sections: time, projects, languages diff --git a/tests/ci.test.js b/tests/ci.test.js index b7c79584..62b0b80e 100644 --- a/tests/ci.test.js +++ b/tests/ci.test.js @@ -14,6 +14,7 @@ describe("Check files editions (checkout your files if needed)", () => { "source/templates/README.md", "action.yml", "settings.example.json", + "tests/plugins/*", ])("%s", async file => expect((await diff()).includes(file)).toBe(false))) describe("Repository level files were not modified", () => void test.each([ @@ -27,6 +28,7 @@ describe("Check files editions (checkout your files if needed)", () => { ".github/readme/partials/introduction.md", ".github/workflows/*", ".github/FUNDING.yml", + ".github/examples.mjs", ".github/index.mjs", ".github/release.mjs", ".github/markdown_example.mjs", diff --git a/tests/metrics.test.js b/tests/metrics.test.js index d0586fd2..352de418 100644 --- a/tests/metrics.test.js +++ b/tests/metrics.test.js @@ -96,7 +96,7 @@ const metadata = JSON.parse(`${ const tests = [] for (const name in metadata.plugins) { const cases = yaml - .load(fs.readFileSync(path.join(__dirname, "../source/plugins", name, "tests.yml"), "utf8")) + .load(fs.readFileSync(path.join(__dirname, "../tests/plugins", name, "tests.yml"), "utf8")) ?.map(({ name: test, with: inputs, modes = [], timeout }) => { const skip = new Set(Object.entries(metadata.templates).filter(([_, { readme: { compatibility } }]) => !compatibility[name]).map(([template]) => template)) if (!(metadata.plugins[name].supports.includes("repository"))) diff --git a/tests/plugins/achievements/tests.yml b/tests/plugins/achievements/tests.yml new file mode 100644 index 00000000..31b660c8 --- /dev/null +++ b/tests/plugins/achievements/tests.yml @@ -0,0 +1,16 @@ +- name: 🏆 Achievements - Detailed display + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_achievements: 'yes' + plugin_achievements_only: sponsor, maintainer, octonaut +- name: 🏆 Achievements - Compact display + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_achievements: 'yes' + plugin_achievements_only: >- + polyglot, stargazer, sponsor, deployer, member, maintainer, developer, + scripter, packager, explorer, infographile, manager + plugin_achievements_display: compact + plugin_achievements_threshold: X diff --git a/tests/plugins/activity/tests.yml b/tests/plugins/activity/tests.yml new file mode 100644 index 00000000..84050712 --- /dev/null +++ b/tests/plugins/activity/tests.yml @@ -0,0 +1,8 @@ +- name: 📰 Recent activity - Recent activity + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_activity: 'yes' + plugin_activity_limit: 5 + plugin_activity_days: 0 + plugin_activity_filter: issue, pr, release, fork, review, ref/create diff --git a/tests/plugins/anilist/tests.yml b/tests/plugins/anilist/tests.yml new file mode 100644 index 00000000..37e281e7 --- /dev/null +++ b/tests/plugins/anilist/tests.yml @@ -0,0 +1,27 @@ +- name: >- + 🌸 Anilist watch list and reading list - Favorites anime and currently + watching + uses: lowlighter/metrics@latest + with: + token: NOT_NEEDED + plugin_anilist: 'yes' + plugin_anilist_medias: anime + plugin_anilist_sections: favorites, watching + plugin_anilist_limit: 1 +- name: >- + 🌸 Anilist watch list and reading list - Favorites manga and currently + reading + uses: lowlighter/metrics@latest + with: + token: NOT_NEEDED + plugin_anilist: 'yes' + plugin_anilist_medias: manga + plugin_anilist_sections: favorites, reading + plugin_anilist_limit: 1 +- name: 🌸 Anilist watch list and reading list - Favorites characters + uses: lowlighter/metrics@latest + with: + token: NOT_NEEDED + plugin_anilist: 'yes' + plugin_anilist_sections: characters + plugin_anilist_limit_characters: 22 diff --git a/tests/plugins/base/tests.yml b/tests/plugins/base/tests.yml new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/tests/plugins/base/tests.yml @@ -0,0 +1 @@ +[] diff --git a/tests/plugins/code/tests.yml b/tests/plugins/code/tests.yml new file mode 100644 index 00000000..606f0600 --- /dev/null +++ b/tests/plugins/code/tests.yml @@ -0,0 +1,7 @@ +- name: ♐ Code snippet of the day - JavaScript or TypeScript snippet of the day + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_code: 'yes' + plugin_code_languages: javascript, typescript + plugin_code_load: 400 diff --git a/tests/plugins/contributors/tests.yml b/tests/plugins/contributors/tests.yml new file mode 100644 index 00000000..e1b3a81f --- /dev/null +++ b/tests/plugins/contributors/tests.yml @@ -0,0 +1,22 @@ +- name: 🏅 Repository contributors - Contributors with contributions count + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + template: repository + repo: metrics + plugin_contributors: 'yes' + plugin_contributors_contributions: 'yes' +- name: 🏅 Repository contributors - Contributors by categories + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + template: repository + repo: metrics + plugin_contributors: 'yes' + plugin_contributors_sections: categories + plugin_contributors_categories: | + { + "🧩 Plugins / 🖼️ templates":["source/plugins/**", "source/templates/**"], + "📚 Documentation":["README.md", "**/README.md", "**/metadata.yml"], + "💻 Code (other)":["source/**", "Dockerfile"] + } diff --git a/tests/plugins/core/tests.yml b/tests/plugins/core/tests.yml new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/tests/plugins/core/tests.yml @@ -0,0 +1 @@ +[] diff --git a/tests/plugins/discussions/tests.yml b/tests/plugins/discussions/tests.yml new file mode 100644 index 00000000..0cd3e75e --- /dev/null +++ b/tests/plugins/discussions/tests.yml @@ -0,0 +1,6 @@ +- name: 💬 Discussions - GitHub Discussions + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_discussions: 'yes' + plugin_discussions_categories_limit: 8 diff --git a/tests/plugins/followup/tests.yml b/tests/plugins/followup/tests.yml new file mode 100644 index 00000000..d2811ed1 --- /dev/null +++ b/tests/plugins/followup/tests.yml @@ -0,0 +1,17 @@ +- name: 🎟️ Follow-up of issues and pull requests - Opened on user's repositories + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_followup: 'yes' +- name: 🎟️ Follow-up of issues and pull requests - Opened by user + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_followup: 'yes' + plugin_followup_sections: user +- name: 🎟️ Follow-up of issues and pull requests - Indepth analysis + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_followup: 'yes' + plugin_followup_indepth: 'yes' diff --git a/source/plugins/code/tests.yml b/tests/plugins/gists/tests.yml similarity index 56% rename from source/plugins/code/tests.yml rename to tests/plugins/gists/tests.yml index 32bf0a4c..376bac10 100644 --- a/source/plugins/code/tests.yml +++ b/tests/plugins/gists/tests.yml @@ -1,5 +1,5 @@ -- name: Code plugin (default) +- name: 🎫 Gists - Gists uses: lowlighter/metrics@latest with: token: MOCKED_TOKEN - plugin_code: yes \ No newline at end of file + plugin_gists: 'yes' diff --git a/tests/plugins/habits/tests.yml b/tests/plugins/habits/tests.yml new file mode 100644 index 00000000..c2efc593 --- /dev/null +++ b/tests/plugins/habits/tests.yml @@ -0,0 +1,16 @@ +- name: 💡 Coding habits - Midly interesting facts + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_habits: 'yes' + plugin_habits_facts: 'yes' + plugin_habits_charts: 'no' + config_timezone: Europe/Paris +- name: 💡 Coding habits - Recent activity charts + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_habits: 'yes' + plugin_habits_facts: 'no' + plugin_habits_charts: 'yes' + config_timezone: Europe/Paris diff --git a/tests/plugins/introduction/tests.yml b/tests/plugins/introduction/tests.yml new file mode 100644 index 00000000..283a7253 --- /dev/null +++ b/tests/plugins/introduction/tests.yml @@ -0,0 +1,15 @@ +- name: 🙋 Introduction - User introduction + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + user: github + base: header + plugin_introduction: 'yes' +- name: 🙋 Introduction - Repository introduction + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + template: repository + repo: metrics + base: header + plugin_introduction: 'yes' diff --git a/tests/plugins/isocalendar/tests.yml b/tests/plugins/isocalendar/tests.yml new file mode 100644 index 00000000..960f2767 --- /dev/null +++ b/tests/plugins/isocalendar/tests.yml @@ -0,0 +1,11 @@ +- name: 📅 Isometric commit calendar - Half-year calendar + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_isocalendar: 'yes' +- name: 📅 Isometric commit calendar - Full-year calendar + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_isocalendar: 'yes' + plugin_isocalendar_duration: full-year diff --git a/tests/plugins/languages/tests.yml b/tests/plugins/languages/tests.yml new file mode 100644 index 00000000..027ad140 --- /dev/null +++ b/tests/plugins/languages/tests.yml @@ -0,0 +1,42 @@ +- name: 🈷️ Most used languages - Most used + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_languages: 'yes' + plugin_languages_ignored: >- + html, css, tex, less, dockerfile, makefile, qmake, lex, cmake, shell, + gnuplot + plugin_languages_limit: 4 +- name: 🈷️ Most used languages - Most used (with details) + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_languages: 'yes' + plugin_languages_ignored: >- + html, css, tex, less, dockerfile, makefile, qmake, lex, cmake, shell, + gnuplot + plugin_languages_details: bytes-size, percentage + plugin_languages_limit: 4 +- name: 🈷️ Most used languages - Recently used + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_languages: 'yes' + plugin_languages_ignored: >- + html, css, tex, less, dockerfile, makefile, qmake, lex, cmake, shell, + gnuplot + plugin_languages_sections: recently-used + plugin_languages_details: bytes-size, percentage + plugin_languages_limit: 4 +- name: 🈷️ Most used languages - Indepth analysis + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_languages: 'yes' + plugin_languages_ignored: >- + html, css, tex, less, dockerfile, makefile, qmake, lex, cmake, shell, + gnuplot + plugin_languages_indepth: 'yes' + plugin_languages_details: lines, bytes-size + plugin_languages_limit: 4 + plugin_languages_analysis_timeout: 15 diff --git a/tests/plugins/licenses/tests.yml b/tests/plugins/licenses/tests.yml new file mode 100644 index 00000000..f4ae901a --- /dev/null +++ b/tests/plugins/licenses/tests.yml @@ -0,0 +1,21 @@ +- name: 📜 Repository licenses - Licenses and permissions + with: + token: MOCKED_TOKEN + template: repository + repo: metrics + plugin_licenses: 'yes' + plugin_licenses_setup: npm ci + timeout: 1800000 + modes: + - action +- name: 📜 Repository licenses - Licenses with open-source ratio graphs + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + template: repository + repo: metrics + plugin_licenses: 'yes' + plugin_licenses_setup: npm ci + plugin_licenses_legal: 'no' + plugin_licenses_ratio: 'yes' + skip: true diff --git a/tests/plugins/lines/tests.yml b/tests/plugins/lines/tests.yml new file mode 100644 index 00000000..e9e90ab0 --- /dev/null +++ b/tests/plugins/lines/tests.yml @@ -0,0 +1,6 @@ +- name: 👨‍💻 Lines of code changed - Lines of code changed + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + base: repositories + plugin_lines: 'yes' diff --git a/source/plugins/music/tests.yml b/tests/plugins/music/tests.yml similarity index 57% rename from source/plugins/music/tests.yml rename to tests/plugins/music/tests.yml index 7b954e85..c9304a07 100644 --- a/source/plugins/music/tests.yml +++ b/tests/plugins/music/tests.yml @@ -1,69 +1,63 @@ -- name: Music plugin (playlist - apple) +- name: 🎼 Music plugin - Apple Music - Random track from playlist uses: lowlighter/metrics@latest with: token: NOT_NEEDED - plugin_music: yes + plugin_music: 'yes' plugin_music_playlist: https://embed.music.apple.com/fr/playlist/usr-share/pl.u-V9D7m8Etjmjd0D - -- name: Music plugin (playlist - spotify) + plugin_music_limit: 2 +- name: 🎼 Music plugin - Spotify - Random track from playlist uses: lowlighter/metrics@latest with: token: NOT_NEEDED - plugin_music: yes + plugin_music: 'yes' plugin_music_playlist: https://open.spotify.com/embed/playlist/3nfA87oeJw4LFVcUDjRcqi - -- name: Music plugin (playlist - yt music) +- name: 🎼 Music plugin - Spotify - Recently listed uses: lowlighter/metrics@latest with: token: NOT_NEEDED - plugin_music: yes - plugin_music_playlist: https://music.youtube.com/playlist?list=OLAK5uy_kU_uxp9TUOl9zVdw77xith8o9AknVwz9U - -- name: Music plugin (recent - spotify) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_music_token: MOCKED_CLIENT_ID, MOCKED_CLIENT_SECRET, MOCKED_REFRESH_TOKEN - plugin_music: yes - plugin_music_played_at: yes + plugin_music: 'yes' plugin_music_provider: spotify - -- name: Music plugin (recent - lastfm) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_music_token: MOCKED_TOKEN - plugin_music: yes - plugin_music_provider: lastfm - plugin_music_user: RJ - -- name: Music plugin (recent - yt music) - uses: lowlighter/metrics@latest - with: - token: NOT_NEEDED - plugin_music_token: SAPISID=MOCKED_COOKIE; OTHER_PARAM=OTHER_VALUE; - plugin_music: yes plugin_music_mode: recent - plugin_music_provider: youtube - -- name: Music plugin (top - spotify - tracks) + plugin_music_token: MOCKED_CLIENT_ID, MOCKED_CLIENT_SECRET, MOCKED_REFRESH_TOKEN + plugin_music_limit: 2 +- name: 🎼 Music plugin - Spotify - Top tracks uses: lowlighter/metrics@latest with: token: NOT_NEEDED - plugin_music_token: MOCKED_CLIENT_ID, MOCKED_CLIENT_SECRET, MOCKED_REFRESH_TOKEN - plugin_music: yes + plugin_music: 'yes' plugin_music_mode: top plugin_music_provider: spotify plugin_music_time_range: short plugin_music_top_type: tracks - -- name: Music plugin (top - spotify - artists) +- name: 🎼 Music plugin - Spotify - Top artists uses: lowlighter/metrics@latest with: token: NOT_NEEDED - plugin_music_token: MOCKED_CLIENT_ID, MOCKED_CLIENT_SECRET, MOCKED_REFRESH_TOKEN - plugin_music: yes + plugin_music: 'yes' plugin_music_mode: top plugin_music_provider: spotify plugin_music_time_range: long plugin_music_top_type: artists +- name: 🎼 Music plugin - Youtube Music - Random track from playlist + uses: lowlighter/metrics@latest + with: + token: NOT_NEEDED + plugin_music: 'yes' + plugin_music_playlist: >- + https://music.youtube.com/playlist?list=OLAK5uy_kU_uxp9TUOl9zVdw77xith8o9AknVwz9U +- name: 🎼 Music plugin - Youtube Music - Recently listed + uses: lowlighter/metrics@latest + with: + token: NOT_NEEDED + plugin_music_token: undefined + plugin_music: 'yes' + plugin_music_mode: recent + plugin_music_provider: youtube +- name: 🎼 Music plugin - Last.fm - Recently listed + uses: lowlighter/metrics@latest + with: + token: NOT_NEEDED + plugin_music_token: MOCKED_TOKEN + plugin_music: 'yes' + plugin_music_provider: lastfm + plugin_music_user: RJ diff --git a/tests/plugins/nightscout/tests.yml b/tests/plugins/nightscout/tests.yml new file mode 100644 index 00000000..97fcc29a --- /dev/null +++ b/tests/plugins/nightscout/tests.yml @@ -0,0 +1,5 @@ +- name: '💉 Nightscout - ' + uses: lowlighter/metrics@latest + with: + plugin_nightscout: 'yes' + plugin_nightscout_url: https://testapp.herokuapp.com/ diff --git a/tests/plugins/notable/tests.yml b/tests/plugins/notable/tests.yml new file mode 100644 index 00000000..f7582e1a --- /dev/null +++ b/tests/plugins/notable/tests.yml @@ -0,0 +1,12 @@ +- name: 🎩 Notable contributions - Contributions + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_notable: 'yes' +- name: 🎩 Notable contributions - Indepth analysis + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_notable: 'yes' + plugin_notable_indepth: 'yes' + plugin_notable_repositories: 'yes' diff --git a/tests/plugins/pagespeed/tests.yml b/tests/plugins/pagespeed/tests.yml new file mode 100644 index 00000000..ea7093de --- /dev/null +++ b/tests/plugins/pagespeed/tests.yml @@ -0,0 +1,20 @@ +- name: ⏱️ Website performances - Succint report + uses: lowlighter/metrics@latest + with: + token: NOT_NEEDED + plugin_pagespeed: 'yes' + plugin_pagespeed_token: MOCKED_TOKEN +- name: ⏱️ Website performances - Detailed report + uses: lowlighter/metrics@latest + with: + token: NOT_NEEDED + plugin_pagespeed: 'yes' + plugin_pagespeed_detailed: 'yes' + plugin_pagespeed_token: MOCKED_TOKEN +- name: ⏱️ Website performances - Screenshot + uses: lowlighter/metrics@latest + with: + token: NOT_NEEDED + plugin_pagespeed: 'yes' + plugin_pagespeed_screenshot: 'yes' + plugin_pagespeed_token: MOCKED_TOKEN diff --git a/tests/plugins/people/tests.yml b/tests/plugins/people/tests.yml new file mode 100644 index 00000000..c2b1fbc3 --- /dev/null +++ b/tests/plugins/people/tests.yml @@ -0,0 +1,17 @@ +- name: 🧑‍🤝‍🧑 People plugin - Followers + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_people: 'yes' + plugin_people_types: followers +- name: 🧑‍🤝‍🧑 People plugin - Contributors and sponsors + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + template: repository + repo: metrics + plugin_people: 'yes' + plugin_people_types: contributors, stargazers, watchers, sponsors + plugin_people_sponsors_custom: >- + iamsainikhil, yutkat, KasparJohannesSchneider, ktnkk, tfSheol, haribo-io, + marcreichel diff --git a/tests/plugins/poopmap/tests.yml b/tests/plugins/poopmap/tests.yml new file mode 100644 index 00000000..14686270 --- /dev/null +++ b/tests/plugins/poopmap/tests.yml @@ -0,0 +1,4 @@ +- name: '💩 PoopMap plugin - ' + uses: lowlighter/metrics@latest + with: + plugin_poopmap: 'yes' diff --git a/tests/plugins/posts/tests.yml b/tests/plugins/posts/tests.yml new file mode 100644 index 00000000..2e8e41b5 --- /dev/null +++ b/tests/plugins/posts/tests.yml @@ -0,0 +1,14 @@ +- name: ✒️ Recent posts - Recent posts + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_posts: 'yes' + plugin_posts_source: dev.to +- name: ✒️ Recent posts - Recent posts with descriptions and cover images + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_posts: 'yes' + plugin_posts_source: dev.to + plugin_posts_descriptions: 'yes' + plugin_posts_covers: 'yes' diff --git a/tests/plugins/projects/tests.yml b/tests/plugins/projects/tests.yml new file mode 100644 index 00000000..257e196a --- /dev/null +++ b/tests/plugins/projects/tests.yml @@ -0,0 +1,7 @@ +- name: 🗂️ Active projects - Project from a repository + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_projects: 'yes' + plugin_projects_repositories: lowlighter/metrics/projects/1 + plugin_projects_descriptions: 'yes' diff --git a/tests/plugins/reactions/tests.yml b/tests/plugins/reactions/tests.yml new file mode 100644 index 00000000..3263ab4b --- /dev/null +++ b/tests/plugins/reactions/tests.yml @@ -0,0 +1,7 @@ +- name: 🎭 Comment reactions - 🎭 Comment reactions + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_reactions: 'yes' + plugin_reactions_limit: 100 + plugin_reactions_details: percentage diff --git a/tests/plugins/repositories/tests.yml b/tests/plugins/repositories/tests.yml new file mode 100644 index 00000000..62fc821c --- /dev/null +++ b/tests/plugins/repositories/tests.yml @@ -0,0 +1,6 @@ +- name: 📓 Repositories - Featured repositories + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_repositories: 'yes' + plugin_repositories_featured: lowlighter/metrics diff --git a/tests/plugins/rss/tests.yml b/tests/plugins/rss/tests.yml new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/tests/plugins/rss/tests.yml @@ -0,0 +1 @@ +[] diff --git a/tests/plugins/screenshot/tests.yml b/tests/plugins/screenshot/tests.yml new file mode 100644 index 00000000..0d380f33 --- /dev/null +++ b/tests/plugins/screenshot/tests.yml @@ -0,0 +1,11 @@ +- name: 📸 Website screenshot - XKCD of the day + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_screenshot: 'yes' + plugin_screenshot_title: XKCD of the day + plugin_screenshot_url: https://xkcd.com + plugin_screenshot_selector: '#comic img' + timeout: 1800000 + modes: + - action diff --git a/tests/plugins/skyline/tests.yml b/tests/plugins/skyline/tests.yml new file mode 100644 index 00000000..b7c7659f --- /dev/null +++ b/tests/plugins/skyline/tests.yml @@ -0,0 +1,11 @@ +- name: 🌇 GitHub Skyline 3D calendar - GitHub Skyline + uses: lowlighter/metrics@latest + with: + token: NOT_NEEDED + plugin_skyline: 'yes' + plugin_skyline_year: 2020 + plugin_skyline_frames: 6 + plugin_skyline_quality: 1 + timeout: 1800000 + modes: + - action diff --git a/tests/plugins/sponsors/tests.yml b/tests/plugins/sponsors/tests.yml new file mode 100644 index 00000000..345e4e19 --- /dev/null +++ b/tests/plugins/sponsors/tests.yml @@ -0,0 +1,11 @@ +- name: 💕 GitHub Sponsors - Sponsors goal + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_sponsors: 'yes' + plugin_sponsors_sections: goal +- name: 💕 GitHub Sponsors - Sponsors introduction + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_sponsors: 'yes' diff --git a/tests/plugins/stackoverflow/tests.yml b/tests/plugins/stackoverflow/tests.yml new file mode 100644 index 00000000..bc8b3ff9 --- /dev/null +++ b/tests/plugins/stackoverflow/tests.yml @@ -0,0 +1,8 @@ +- name: 🗨️ Stackoverflow plugin - Top answers from stackoverflow + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_stackoverflow: 'yes' + plugin_stackoverflow_user: 1 + plugin_stackoverflow_sections: answers-top + plugin_stackoverflow_limit: 2 diff --git a/tests/plugins/stargazers/tests.yml b/tests/plugins/stargazers/tests.yml new file mode 100644 index 00000000..249d2667 --- /dev/null +++ b/tests/plugins/stargazers/tests.yml @@ -0,0 +1,5 @@ +- name: ✨ Stargazers over last weeks - Last weeks stargazers + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_stargazers: 'yes' diff --git a/tests/plugins/starlists/tests.yml b/tests/plugins/starlists/tests.yml new file mode 100644 index 00000000..18ec1f7a --- /dev/null +++ b/tests/plugins/starlists/tests.yml @@ -0,0 +1,7 @@ +- name: 💫 Starlists - Featured star list + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_starlists: 'yes' + plugin_starlists_limit_repositories: 2 + plugin_starlists_only: 🤘 TC39 diff --git a/tests/plugins/stars/tests.yml b/tests/plugins/stars/tests.yml new file mode 100644 index 00000000..423a200d --- /dev/null +++ b/tests/plugins/stars/tests.yml @@ -0,0 +1,6 @@ +- name: 🌟 Recently starred repositories - Recently starred + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_stars: 'yes' + plugin_stars_limit: 3 diff --git a/tests/plugins/stock/tests.yml b/tests/plugins/stock/tests.yml new file mode 100644 index 00000000..6c0da233 --- /dev/null +++ b/tests/plugins/stock/tests.yml @@ -0,0 +1,7 @@ +- name: 💹 Stock prices - Stock prices from Tesla + uses: lowlighter/metrics@latest + with: + token: NOT_NEEDED + plugin_stock: 'yes' + plugin_stock_token: MOCKED_TOKEN + plugin_stock_symbol: TSLA diff --git a/tests/plugins/support/tests.yml b/tests/plugins/support/tests.yml new file mode 100644 index 00000000..8eb57db2 --- /dev/null +++ b/tests/plugins/support/tests.yml @@ -0,0 +1,5 @@ +- name: 💭 GitHub Community Support - GitHub Community Support + uses: lowlighter/metrics@latest + with: + token: NOT_NEEDED + plugin_support: 'yes' diff --git a/tests/plugins/topics/tests.yml b/tests/plugins/topics/tests.yml new file mode 100644 index 00000000..ff9d5f1d --- /dev/null +++ b/tests/plugins/topics/tests.yml @@ -0,0 +1,13 @@ +- name: 📌 Starred topics - Labels + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_topics: 'yes' + plugin_topics_limit: 12 +- name: 📌 Starred topics - Icons + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_topics: 'yes' + plugin_topics_limit: 0 + plugin_topics_mode: icons diff --git a/source/plugins/lines/tests.yml b/tests/plugins/traffic/tests.yml similarity index 51% rename from source/plugins/lines/tests.yml rename to tests/plugins/traffic/tests.yml index 2150afe7..e58fb727 100644 --- a/source/plugins/lines/tests.yml +++ b/tests/plugins/traffic/tests.yml @@ -1,7 +1,6 @@ -- name: Lines plugin (default) +- name: 🧮 Repositories traffic - Repositories traffic uses: lowlighter/metrics@latest with: token: MOCKED_TOKEN base: repositories - plugin_lines: yes - + plugin_traffic: 'yes' diff --git a/tests/plugins/tweets/tests.yml b/tests/plugins/tweets/tests.yml new file mode 100644 index 00000000..54b9f712 --- /dev/null +++ b/tests/plugins/tweets/tests.yml @@ -0,0 +1,15 @@ +- name: 🐤 Latest tweets - Latest tweets + uses: lowlighter/metrics@latest + with: + token: NOT_NEEDED + plugin_tweets: 'yes' + plugin_tweets_token: MOCKED_TOKEN + plugin_tweets_user: github +- name: 🐤 Latest tweets - Latest tweets including attachments + uses: lowlighter/metrics@latest + with: + token: NOT_NEEDED + plugin_tweets: 'yes' + plugin_tweets_token: MOCKED_TOKEN + plugin_tweets_attachments: 'yes' + plugin_tweets_user: github diff --git a/tests/plugins/wakatime/tests.yml b/tests/plugins/wakatime/tests.yml new file mode 100644 index 00000000..c0bd4b67 --- /dev/null +++ b/tests/plugins/wakatime/tests.yml @@ -0,0 +1,7 @@ +- name: ⏰ WakaTime plugin - ⏰ WakaTime + uses: lowlighter/metrics@latest + with: + token: NOT_NEEDED + plugin_wakatime: 'yes' + plugin_wakatime_sections: time, projects, projects-graphs, languages, languages-graphs, editors, os + plugin_wakatime_token: MOCKED_TOKEN