From 9d5063f36cba366ffd0c7a7bf4551b6eeef1d04a Mon Sep 17 00:00:00 2001 From: nicholasnet Date: Mon, 24 Apr 2023 13:59:21 -0400 Subject: [PATCH 01/30] Added GitHub action flow for frontend. --- .github/workflows/main.yaml | 42 +++++++++++++++++++ .github/workflows/pr-checks.yaml | 15 ------- frontend/src/components/DataGrid/DataGrid.vue | 2 +- .../components/DataGrid/NumberDataFilter.vue | 2 +- .../components/DataGrid/TextDataFilter.vue | 2 +- frontend/src/components/MessageTabs.vue | 2 +- frontend/src/views/TopicMessageView.vue | 33 +-------------- gradle.properties | 2 +- 8 files changed, 49 insertions(+), 51 deletions(-) delete mode 100644 .github/workflows/pr-checks.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index e69de29..ca3ec5f 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -0,0 +1,42 @@ +name: 'UI Tests' +on: + workflow_dispatch: +# pull_request: +# branches: +# - main +jobs: + check-changes-in-frontend: + runs-on: ubuntu-latest + name: Test Frontend + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Get changed files in the frontend folder + id: changed-files-specific + uses: tj-actions/changed-files@v34 + with: + files: frontend/** + + - name: Run step if any file(s) in the frontend folder change + if: steps.changed-files-specific.outputs.any_changed == 'true' + run: echo frontend is affected + + - name: Prevent from running + if: steps.changed-files-specific.outputs.any_changed != 'true' + run: exit 1 + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + needs: [check-changes-in-frontend] + steps: + - uses: actions/setup-node@v3 + working-directory: ./frontend + with: + node-version: 18 + cache: 'npm' + - run: npm ci + - run: npm run lint + - run: npm run test:unit:ci + - run: npm run build diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml deleted file mode 100644 index 61adb2b..0000000 --- a/.github/workflows/pr-checks.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: "PR Checklist checked" -on: - pull_request_target: - types: [opened, edited, synchronize, reopened] - -jobs: - task-check: - runs-on: ubuntu-latest - steps: - - uses: kentaro-m/task-completed-checker-action@v0.1.1 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - - uses: dekinderfiets/pr-description-enforcer@0.0.1 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/frontend/src/components/DataGrid/DataGrid.vue b/frontend/src/components/DataGrid/DataGrid.vue index e646803..7c443c6 100644 --- a/frontend/src/components/DataGrid/DataGrid.vue +++ b/frontend/src/components/DataGrid/DataGrid.vue @@ -138,7 +138,7 @@
diff --git a/frontend/src/components/DataGrid/TextDataFilter.vue b/frontend/src/components/DataGrid/TextDataFilter.vue index 353c408..b5a6f01 100644 --- a/frontend/src/components/DataGrid/TextDataFilter.vue +++ b/frontend/src/components/DataGrid/TextDataFilter.vue @@ -1,6 +1,6 @@