chore: run unit testing on the master (#136)

This commit is contained in:
Rick 2023-07-21 09:34:22 +08:00 committed by GitHub
parent 807f3d83d4
commit 0809f352b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 3 deletions

View File

@ -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:

View File

@ -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));