diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cc2ef61..6e252b8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -40,6 +40,27 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GH_PUBLISH_SECRETS }} + Test: + runs-on: ubuntu-20.04 + steps: + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.18.x + - uses: actions/checkout@v3.0.0 + - name: Unit Test + run: | + make test-all-backend + - name: Report + if: github.actor == 'linuxsuren' + env: + CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} + run: | + bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial --force-coverage-parser go -r coverage.out + bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial --force-coverage-parser go -r collector-coverage.out + bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial --force-coverage-parser go -r store-orm-coverage.out + bash <(curl -Ls https://coverage.codacy.com/get.sh) final + image: runs-on: ubuntu-20.04 steps: diff --git a/console/atest-ui/cypress/e2e/component-exist.cy.ts b/console/atest-ui/cypress/e2e/component-exist.cy.ts index 851f230..b3c685d 100644 --- a/console/atest-ui/cypress/e2e/component-exist.cy.ts +++ b/console/atest-ui/cypress/e2e/component-exist.cy.ts @@ -27,7 +27,8 @@ describe('Suite Manage', () => { cy.get('[test-id="open-new-case-dialog"]').click() cy.get('[test-id="case-form-name"]').should('be.visible').type(caseName) - const methodSelector = cy.get('[test-id="case-form-method"]').clear() + const methodSelector = cy.get('[test-id="case-form-method"]') + methodSelector.clear() methodSelector.type(caseMethod) cy.get('[test-id="case-form-api"]').should('be.visible').type(caseAPI) @@ -36,7 +37,8 @@ describe('Suite Manage', () => { it('Find Case', () => { cy.visit('/') - const searchInput = cy.get('[test-id="search"]').type(caseName) + const searchInput = cy.get('[test-id="search"]') + searchInput.type(caseName) searchInput.trigger('keydown', {key: 'Enter'}) // select the target case @@ -56,7 +58,7 @@ describe('Suite Manage', () => { function userID_Alpha() { let text = ""; - let possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + const possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; for (let i = 0; i < 10; i++) text += possible.charAt(Math.floor(Math.random() * possible.length));