diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 582ff28eeeb..cb3a5723961 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,12 +2,20 @@ name: CI on: push: + branches-ignore: + - gh-pages pull_request: + branches-ignore: + - gh-pages schedule: # Run daily at 01:34, so we get notified if CI is broken before a pull request # is submitted. - cron: "34 1 * * *" +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + permissions: contents: read pull-requests: read @@ -33,3 +41,4 @@ jobs: steps: - run: | echo "All required checks done" + diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cff9a3e0c72..5572e4b9d99 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,7 +8,29 @@ permissions: pull-requests: read jobs: - lint-go: + ts-lint: + # TODO(JayF): Determine what nodejs versions we target, and setup matrix-based testing similar to what we do for go + name: Lint TypeScript + runs-on: ubuntu-22.04 + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16.14.2 + cache: yarn + cache-dependency-path: ./internal/lookout/ui/yarn.lock + + - name: Check TypeScript formatting + run: | + yarn install --frozen-lockfile && yarn run fmt || exit 1 + exit $(git status -s -uno | wc -l) + working-directory: ./internal/lookout/ui + + go-lint: name: Lint Go runs-on: ubuntu-22.04 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3c7b0c920fb..6ee6bc6223e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,27 @@ permissions: checks: write jobs: - unit-tests: + ts-unit-tests: + name: TypeScript Unit Tests + runs-on: ubuntu-22.04 + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16.14.2 + cache: yarn + cache-dependency-path: ./internal/lookout/ui/yarn.lock + + - name: Run Unit Tests + run: | + yarn install --frozen-lockfile && yarn run openapi && CI=true yarn run test + working-directory: ./internal/lookout/ui + + go-unit-tests: name: Unit Tests runs-on: ubuntu-22.04 @@ -56,7 +76,7 @@ jobs: name: codecov-armada-unit-tests verbose: true - integration-tests: + go-integration-tests: name: Integration Tests runs-on: ubuntu-22.04 diff --git a/.github/workflows/ts.yml b/.github/workflows/ts.yml deleted file mode 100644 index 52887248a84..00000000000 --- a/.github/workflows/ts.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Lookout - -on: - push: - branches-ignore: - - master - paths: - - 'internal/lookout/ui/**' - - 'build/lookout/**' - - '.github/workflows/ts.yml' - pull_request: - branches-ignore: - - gh-pages - paths: - - 'internal/lookout/ui/**' - - 'build/lookout/**' - - '.github/workflows/ts.yml' - -jobs: - ts-lint: - # TODO(JayF): Determine what nodejs versions we target, and setup matrix-based testing similar to what we do for go - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16.14.2 - - - name: Check TypeScript formatting - run: | - yarn install --frozen-lockfile && yarn run fmt || exit 1 - exit $(git status -s -uno | wc -l) - working-directory: ./internal/lookout/ui - ts-unit-tests: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16.14.2 - - - name: Run Unit Tests - run: | - yarn install --frozen-lockfile && yarn run openapi && CI=true yarn run test - working-directory: ./internal/lookout/ui - -