From cd845767581aa1951cda00607bbd733497d5c61d Mon Sep 17 00:00:00 2001 From: wlee221 Date: Wed, 10 Nov 2021 15:38:41 -0800 Subject: [PATCH 1/5] Add a script and workflow for tracking `@todo-`s --- .github/scripts/track-todos.sh | 19 +++++++++++++++++++ .github/workflows/track-todos.yml | 13 +++++++++++++ 2 files changed, 32 insertions(+) create mode 100755 .github/scripts/track-todos.sh create mode 100644 .github/workflows/track-todos.yml diff --git a/.github/scripts/track-todos.sh b/.github/scripts/track-todos.sh new file mode 100755 index 00000000000..75c0761b656 --- /dev/null +++ b/.github/scripts/track-todos.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# total number of .feature files that has unresolved @todo-tags +nTodoFiles=$(grep -R -e "@todo-*" ./packages/e2e/features/ -l | wc -l | sed -e 's/^[ \t]*//'); + +red="\033[0;31m" +nocolor="\033[0m" + +if [ ${nTodoFiles} -gt 0 ]; then + echo "\n---------" + echo "ERROR: There are ${red}${nTodoFiles}${nocolor} feature files with @todo tags." + echo "---------" + + grep -RIci "@todo-" ./packages/e2e/features/ | awk -v FS=":" '$2>0 { print $1, "has", $2, "@todo tags." }'; + echo "\n" + exit 1; +else + echo "🎉 No @todo tags were found." +fi diff --git a/.github/workflows/track-todos.yml b/.github/workflows/track-todos.yml new file mode 100644 index 00000000000..c175281486d --- /dev/null +++ b/.github/workflows/track-todos.yml @@ -0,0 +1,13 @@ +on: + push: + branches: [main] + +jobs: + publish: + runs-on: ubuntu-latest + environment: ci + steps: + - name: Checkout repo + uses: actions/checkout@v2 + - name: Track TODOs + run: chmod +x ./.github/scripts/track-todos.sh && ./.github/scripts/track-todos.sh From 4789bf96136bced29588ea8455c742350a9f305b Mon Sep 17 00:00:00 2001 From: wlee221 Date: Wed, 10 Nov 2021 15:39:17 -0800 Subject: [PATCH 2/5] [REVERT THIS] Test out the script --- .github/workflows/track-todos.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/track-todos.yml b/.github/workflows/track-todos.yml index c175281486d..71c5d1ce14f 100644 --- a/.github/workflows/track-todos.yml +++ b/.github/workflows/track-todos.yml @@ -1,6 +1,8 @@ on: push: branches: [main] + pull_request: + branches: [main] jobs: publish: From 58686de20a9628ccc59764d3918a45e0e796c5bd Mon Sep 17 00:00:00 2001 From: wlee221 Date: Wed, 10 Nov 2021 15:41:12 -0800 Subject: [PATCH 3/5] Add name to the workflow --- .github/workflows/track-todos.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/track-todos.yml b/.github/workflows/track-todos.yml index 71c5d1ce14f..f6804b54bbf 100644 --- a/.github/workflows/track-todos.yml +++ b/.github/workflows/track-todos.yml @@ -1,3 +1,5 @@ +name: Track @TODOs + on: push: branches: [main] From 34b002688edeed561452fc045a8b7b7a14abef34 Mon Sep 17 00:00:00 2001 From: wlee221 Date: Wed, 10 Nov 2021 15:52:11 -0800 Subject: [PATCH 4/5] Revert "[REVERT THIS] Test out the script" This reverts commit 4789bf96136bced29588ea8455c742350a9f305b. --- .github/workflows/track-todos.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/track-todos.yml b/.github/workflows/track-todos.yml index f6804b54bbf..c45677e9c8c 100644 --- a/.github/workflows/track-todos.yml +++ b/.github/workflows/track-todos.yml @@ -3,8 +3,6 @@ name: Track @TODOs on: push: branches: [main] - pull_request: - branches: [main] jobs: publish: From 43fe7b152142a36bdc73c5397a8a256a27edb6a4 Mon Sep 17 00:00:00 2001 From: wlee221 Date: Wed, 10 Nov 2021 15:54:11 -0800 Subject: [PATCH 5/5] No longer test @todo-framework --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b77b507907e..c35bb4b6700 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -62,13 +62,13 @@ jobs: matrix: include: - framework: angular - tags: ${{ contains(github.ref, 'main') && '@angular and not @skip' || '@angular and not (@skip or @todo-angular)' }} + tags: '@angular and not (@skip or @todo-angular)' - framework: next - tags: ${{ contains(github.ref, 'main') && '@react and not @skip' || '@react and not (@skip or @todo-react)' }} + tags: '@react and not (@skip or @todo-react)' - framework: vue - tags: ${{ contains(github.ref, 'main') && '@vue and not @skip' || '@vue and not (@skip or @todo-vue)' }} + tags: '@vue and not (@skip or @todo-vue)' steps: - name: Checkout Amplify UI