Files
upstream-corteza/.github/workflows/test.yml
upstream-mirror 7e385fc126
Some checks failed
SonarQube / SonarQube (push) Failing after 5m28s
E2e test on main branch push / server and client test (map[name:admin port:8080]) (push) Failing after 3m33s
Server and lib tests / Library test (js) (push) Failing after 1m36s
Server and lib tests / Library test (vue) (push) Successful in 2m24s
Server and lib tests / Web client test (admin) (push) Successful in 2m52s
Server and lib tests / Web client test (compose) (push) Successful in 3m23s
Server and lib tests / Web client test (discovery) (push) Successful in 2m49s
Server and lib tests / Web client test (one) (push) Successful in 2m52s
Server and lib tests / Web client test (privacy) (push) Successful in 2m44s
Server and lib tests / Web client test (reporter) (push) Successful in 2m56s
Server and lib tests / Web client test (workflow) (push) Successful in 3m0s
Server and lib tests / Server tests (push) Failing after 4m55s
E2e test on main branch push / notify-failure (push) Failing after 9s
Server and lib tests / Send matrix testing notification (push) Successful in 2s
Mark stale issues and pull requests / stale (push) Successful in 40s
snapshot of https://github.com/cortezaproject/corteza.git (2024.9.x, 2026-09-18; blobs > 131072B omitted)
2026-09-18 01:22:23 +05:00

116 lines
3.3 KiB
YAML

name: "Server and lib tests"
# These jobs can be tested with nektos/act tool
# https://github.com/nektos/act
#
# Look for "!env.ACT" in the DRY_RUN expression below
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- '20[0-9][0-9].[0-9].x'
- '20[0-9][0-9].[0-9].[0-9]'
env:
BUILD_OS: linux
BUILD_ARCH: amd64
GO_VERSION: 1.24.1
GOFLAGS: -mod=readonly
WORKFLOW_STACK_TRACE_FULL: true
NODE_VERSION: 22
jobs:
lib-test:
name: "Library test (${{ matrix.lib }})"
runs-on: ubuntu-22.04
strategy:
matrix:
lib: [ "js", "vue" ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with: { node-version: "${{ env.NODE_VERSION }}" }
- uses: actions/cache@v3
if: ${{ !env.ACT }}
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.OS }}-node-${{ matrix.lib }}
- name: "Setup YARN"
run: npm install -g yarn @vue/cli-service
- name: "Install dependencies"
working-directory: lib/${{ matrix.lib }}
run: yarn install
- name: "Run all tests"
working-directory: lib/${{ matrix.lib }}
run: yarn test:unit
client-web-test:
name: "Web client test (${{ matrix.app }})"
runs-on: ubuntu-22.04
strategy:
matrix: { app: [ admin, compose, discovery, privacy, reporter, one, workflow ] }
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with: { node-version: "${{ env.NODE_VERSION }}" }
- name: "Setup YARN"
working-directory: client/web/${{ matrix.app }}
run: npm install -g yarn @vue/cli-service
- name: "Cache"
uses: actions/cache@v3
if: ${{ !env.ACT }}
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.OS }}-node-
- name: "Dependencies"
working-directory: client/web/${{ matrix.app }}
run: make dep
- name: "Tests"
working-directory: client/web/${{ matrix.app }}
run: make test
server-test:
name: "Server tests"
runs-on: ubuntu-22.04
env:
GOFLAGS: -mod=readonly
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with: { go-version: "${{ env.GO_VERSION }}" }
- name: "Copy language files"
working-directory: server/pkg/locale
run: make src/en
- name: "Unit"
working-directory: server
run: make test.unit
- name: "Store"
working-directory: server
run: make test.store
- name: "Integration"
working-directory: server
run: make test.integration
notify:
if: failure()
name: "Send matrix testing notification"
runs-on: ubuntu-22.04
needs: [ server-test, client-web-test, lib-test ]
steps:
- name: "Send message via Matrix on failed tests"
if: ${{ !env.ACT && failure() }}
id: matrix-chat-tests-failed
uses: fadenb/matrix-chat-message@v0.0.6
with:
homeserver: ${{ secrets.MATRIX_HOME_SERVER }}
token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
channel: ${{ secrets.MATRIX_ROOM_ID }}
message: |
# Corteza **${GITHUB_REF##*/}** tests have failed