Skip to content

More code. Add temp debug messages. Comment out tests. #13206

More code. Add temp debug messages. Comment out tests.

More code. Add temp debug messages. Comment out tests. #13206

Workflow file for this run

on:
push:
branches-ignore:
- "main"
tags-ignore:
- "*"
paths-ignore:
- "bin/**"
- ".github/pull_request_template.md" # but don't exclude ./workflows !
- ".github/ISSUE_TEMPLATE/**"
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
name: run tests
jobs:
cache:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
- name: Configure git for private modules
env:
GITHUB_BUILD_USERNAME: wge-build-bot
GITHUB_BUILD_TOKEN: ${{ secrets.BUILD_BOT_PERSONAL_ACCESS_TOKEN }}
run: git config --global url."https://${GITHUB_BUILD_USERNAME}:${GITHUB_BUILD_TOKEN}@github.com".insteadOf "https://github.com"
- name: Download dependencies
run: go mod download
lint:
needs: cache
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
- name: Configure git for private modules
env:
GITHUB_BUILD_USERNAME: wge-build-bot
GITHUB_BUILD_TOKEN: ${{ secrets.BUILD_BOT_PERSONAL_ACCESS_TOKEN }}
run: git config --global url."https://${GITHUB_BUILD_USERNAME}:${GITHUB_BUILD_TOKEN}@github.com".insteadOf "https://github.com"
- name: Lint
run: make lint
unit-tests:
needs: cache
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
- name: Configure git for private modules
env:
GITHUB_BUILD_USERNAME: wge-build-bot
GITHUB_BUILD_TOKEN: ${{ secrets.BUILD_BOT_PERSONAL_ACCESS_TOKEN }}
run: git config --global url."https://${GITHUB_BUILD_USERNAME}:${GITHUB_BUILD_TOKEN}@github.com".insteadOf "https://github.com"
- name: Run unit tests
run: make unit-tests-with-coverage
build:
uses: ./.github/workflows/build.yaml
with:
helmrepo: "charts-v3-r2"
secrets:
BUILD_BOT_PERSONAL_ACCESS_TOKEN: ${{ secrets.BUILD_BOT_PERSONAL_ACCESS_TOKEN }}
WGE_DOCKER_IO_USER: ${{ secrets.WGE_DOCKER_IO_USER }}
WGE_DOCKER_IO_PASSWORD: ${{ secrets.WGE_DOCKER_IO_PASSWORD }}
WGE_S3_AWS_ACCESS_KEY_ID: ${{ secrets.WGE_S3_AWS_ACCESS_KEY_ID }}
WGE_S3_AWS_SECRET_ACCESS_KEY: ${{ secrets.WGE_S3_AWS_SECRET_ACCESS_KEY }}
integration-tests:
needs: cache
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }} # do not run integration test for dependabot dependency updates
env:
AZURE_DEVOPS_TOKEN: ${{ secrets.AZURE_DEVOPS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.WGE_GITHUB_TOKEN }}
GITHUB_ORG: ${{ secrets.WGE_GITHUB_ORG }}
GITHUB_USER: ${{ secrets.WGE_GITHUB_USER }}
GITLAB_TOKEN: ${{ secrets.WGE_ON_PREM_GITLAB_TOKEN }}
GIT_PROVIDER_HOSTNAME: gitlab.git.dev.weave.works
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.x
- name: Configure git for private modules
env:
GITHUB_BUILD_USERNAME: wge-build-bot
GITHUB_BUILD_TOKEN: ${{ secrets.BUILD_BOT_PERSONAL_ACCESS_TOKEN }}
run: git config --global url."https://${GITHUB_BUILD_USERNAME}:${GITHUB_BUILD_TOKEN}@github.com".insteadOf "https://github.com"
- name: Set up ssh
uses: ./.github/actions/setup-ssh
with:
ssh-private-key: ${{ secrets.WGE_GITHUB_PRIVATE_KEY }}
- name: Run integration tests
run: make integration-tests
ui-unit-tests:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.BUILD_BOT_PERSONAL_ACCESS_TOKEN }}
YARN_CACHE_NAME: cache-yarn
steps:
- id: cache-paths
run: |
echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT
echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Yarn Cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ${{ steps.cache-paths.outputs.dir }}
key: ${{ runner.os }}-${{ env.YARN_CACHE_NAME }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.YARN_CACHE_NAME }}-
- name: Install modules
run: yarn --pure-lockfile
- name: Typecheck Frontend Code
run: yarn tsc
- name: Lint Frontend Code
run: yarn lint
- name: Run Front-end Unit Tests
run: yarn test