2021-09-11 06:51:51 +00:00
|
|
|
# This is a basic workflow to help you get started with Actions
|
|
|
|
|
|
|
|
name: CI
|
|
|
|
|
2023-06-09 10:36:55 +00:00
|
|
|
concurrency:
|
2022-06-03 16:44:11 +00:00
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
# Controls when the action will run.
|
2021-09-11 06:51:51 +00:00
|
|
|
on:
|
|
|
|
# Triggers the workflow on push or pull request events but only for the main branch
|
|
|
|
push:
|
2023-06-20 05:47:00 +00:00
|
|
|
branches: [main]
|
2022-02-23 16:10:43 +00:00
|
|
|
tags:
|
|
|
|
- v*
|
2023-01-06 07:31:30 +00:00
|
|
|
pull_request:
|
2023-06-20 05:47:00 +00:00
|
|
|
branches: [main]
|
2021-09-11 06:51:51 +00:00
|
|
|
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
|
|
workflow_dispatch:
|
|
|
|
|
2023-10-07 10:38:21 +00:00
|
|
|
env:
|
|
|
|
CacheFolders: |
|
|
|
|
common
|
|
|
|
deploy
|
|
|
|
dev
|
|
|
|
models
|
|
|
|
packages
|
|
|
|
plugins
|
|
|
|
pods
|
|
|
|
products
|
|
|
|
server
|
|
|
|
server-plugins
|
|
|
|
templates
|
|
|
|
tests
|
2024-07-13 15:23:11 +00:00
|
|
|
qms-tests
|
2023-10-07 10:38:21 +00:00
|
|
|
rush.json
|
|
|
|
.prettierrc
|
|
|
|
tools
|
2024-02-23 05:37:22 +00:00
|
|
|
|
2021-09-11 06:51:51 +00:00
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
|
|
jobs:
|
|
|
|
# This workflow contains a single job called "build"
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2024-04-02 14:17:38 +00:00
|
|
|
timeout-minutes: 60
|
2021-09-11 06:51:51 +00:00
|
|
|
steps:
|
2023-09-05 05:32:12 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-06-03 16:44:11 +00:00
|
|
|
with:
|
2024-02-23 05:37:22 +00:00
|
|
|
fetch-depth: 0
|
|
|
|
filter: tree:0
|
2024-02-07 05:20:54 +00:00
|
|
|
- uses: actions/setup-node@v4
|
2024-02-06 02:57:31 +00:00
|
|
|
with:
|
|
|
|
node-version-file: '.nvmrc'
|
2022-01-25 08:25:20 +00:00
|
|
|
- name: Cache node modules
|
2024-01-18 05:45:06 +00:00
|
|
|
uses: actions/cache@v4
|
2022-01-25 08:25:20 +00:00
|
|
|
env:
|
2023-11-29 09:30:16 +00:00
|
|
|
cache-name: cache-node-platform
|
2022-01-25 08:25:20 +00:00
|
|
|
with:
|
2023-06-22 08:22:37 +00:00
|
|
|
path: |
|
2023-10-07 10:38:21 +00:00
|
|
|
common/temp
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
2022-01-25 08:25:20 +00:00
|
|
|
restore-keys: |
|
2023-10-07 10:38:21 +00:00
|
|
|
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
2022-06-02 17:00:00 +00:00
|
|
|
|
|
|
|
- name: Checking for mis-matching dependencies...
|
|
|
|
run: node common/scripts/install-run-rush.js check
|
|
|
|
|
|
|
|
- name: Installing...
|
|
|
|
run: node common/scripts/install-run-rush.js install
|
|
|
|
|
2024-01-23 16:18:36 +00:00
|
|
|
- name: Model version from git tags
|
|
|
|
run: node common/scripts/install-run-rush.js model-version
|
2024-02-23 05:37:22 +00:00
|
|
|
|
2022-06-02 17:00:00 +00:00
|
|
|
- name: Building...
|
2024-02-23 05:37:22 +00:00
|
|
|
run: node common/scripts/install-run-rush.js build -p 20
|
2022-01-25 08:25:20 +00:00
|
|
|
|
2024-02-23 05:37:22 +00:00
|
|
|
- name: Bundle...
|
|
|
|
run: node common/scripts/install-run-rush.js bundle -p 20
|
|
|
|
|
|
|
|
- name: Validate...
|
|
|
|
run: node common/scripts/install-run-rush.js validate -p 20
|
2023-06-09 10:36:55 +00:00
|
|
|
|
2023-10-07 10:38:21 +00:00
|
|
|
- name: Cache build results
|
2024-01-18 05:45:06 +00:00
|
|
|
uses: actions/cache@v4
|
2022-01-25 08:25:20 +00:00
|
|
|
env:
|
|
|
|
cache-name: cache-build-results
|
|
|
|
with:
|
2023-10-07 10:38:21 +00:00
|
|
|
path: ${{ env.CacheFolders}}
|
2022-06-03 16:44:11 +00:00
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
|
|
|
|
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
|
|
|
|
svelte-check:
|
2022-04-29 16:47:22 +00:00
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
2024-04-02 14:17:38 +00:00
|
|
|
timeout-minutes: 60
|
2022-04-29 16:47:22 +00:00
|
|
|
steps:
|
2023-09-05 05:32:12 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-04-29 16:47:22 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-02-23 05:37:22 +00:00
|
|
|
filter: tree:0
|
2022-04-29 16:47:22 +00:00
|
|
|
|
2024-02-07 05:20:54 +00:00
|
|
|
- uses: actions/setup-node@v4
|
2024-02-06 02:57:31 +00:00
|
|
|
with:
|
|
|
|
node-version-file: '.nvmrc'
|
|
|
|
|
2022-04-29 16:47:22 +00:00
|
|
|
- name: Cache build results
|
2024-01-18 05:45:06 +00:00
|
|
|
uses: actions/cache@v4
|
2022-04-29 16:47:22 +00:00
|
|
|
env:
|
|
|
|
cache-name: cache-build-results
|
|
|
|
with:
|
2023-10-07 10:38:21 +00:00
|
|
|
path: ${{ env.CacheFolders}}
|
2022-06-03 16:44:11 +00:00
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
|
|
|
|
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
|
|
|
|
- name: Checking svelte sources...
|
|
|
|
run: node common/scripts/install-run-rush.js svelte-check
|
2022-04-29 05:27:17 +00:00
|
|
|
formatting:
|
2022-02-10 09:04:18 +00:00
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
2024-04-02 14:17:38 +00:00
|
|
|
timeout-minutes: 60
|
2022-02-10 09:04:18 +00:00
|
|
|
steps:
|
2023-09-05 05:32:12 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-02-10 09:04:18 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-02-07 05:20:54 +00:00
|
|
|
- uses: actions/setup-node@v4
|
2024-02-06 02:57:31 +00:00
|
|
|
with:
|
|
|
|
node-version-file: '.nvmrc'
|
2022-02-10 09:04:18 +00:00
|
|
|
- name: Cache build results
|
2024-01-18 05:45:06 +00:00
|
|
|
uses: actions/cache@v4
|
2022-02-10 09:04:18 +00:00
|
|
|
env:
|
|
|
|
cache-name: cache-build-results
|
|
|
|
with:
|
2023-10-07 10:38:21 +00:00
|
|
|
path: ${{ env.CacheFolders}}
|
2022-06-03 16:44:11 +00:00
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
|
|
|
|
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
|
2022-02-10 09:04:18 +00:00
|
|
|
|
2024-03-11 04:24:46 +00:00
|
|
|
- name: Apply templates...
|
|
|
|
run: node common/scripts/install-run-rush.js apply-templates
|
|
|
|
|
|
|
|
- name: Check templates
|
|
|
|
run: |
|
|
|
|
echo '================================================================'
|
|
|
|
echo 'Checking for diff files'
|
|
|
|
echo '================================================================'
|
|
|
|
git diff '*.js' '*.ts' '*.svelte' '*.json' | cat
|
|
|
|
[ -z "$(git diff --name-only '*.js' '*.ts' '*.svelte' '*.json' | cat)" ]
|
|
|
|
echo '================================================================'
|
2022-04-29 05:27:17 +00:00
|
|
|
- name: Formatting...
|
2023-02-17 15:17:56 +00:00
|
|
|
run: node common/scripts/install-run-rush.js fast-format
|
2022-04-29 16:47:22 +00:00
|
|
|
- name: Check files formatting
|
|
|
|
run: |
|
|
|
|
echo '================================================================'
|
|
|
|
echo 'Checking for diff files'
|
|
|
|
echo '================================================================'
|
2024-03-11 04:24:46 +00:00
|
|
|
git diff '*.js' '*.ts' '*.svelte' '*.json' | cat
|
|
|
|
[ -z "$(git diff --name-only '*.js' '*.ts' '*.svelte' '*.json' | cat)" ]
|
2022-06-03 16:44:11 +00:00
|
|
|
echo '================================================================'
|
2022-01-25 08:25:20 +00:00
|
|
|
test:
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
2024-04-02 14:17:38 +00:00
|
|
|
timeout-minutes: 60
|
2022-01-25 08:25:20 +00:00
|
|
|
steps:
|
2023-09-05 05:32:12 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-01-25 08:25:20 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-02-23 05:37:22 +00:00
|
|
|
filter: tree:0
|
2024-02-07 05:20:54 +00:00
|
|
|
- uses: actions/setup-node@v4
|
2024-02-06 02:57:31 +00:00
|
|
|
with:
|
|
|
|
node-version-file: '.nvmrc'
|
2022-01-25 08:25:20 +00:00
|
|
|
- name: Cache build results
|
2024-01-18 05:45:06 +00:00
|
|
|
uses: actions/cache@v4
|
2022-01-25 08:25:20 +00:00
|
|
|
env:
|
|
|
|
cache-name: cache-build-results
|
|
|
|
with:
|
2023-10-07 10:38:21 +00:00
|
|
|
path: ${{ env.CacheFolders}}
|
2022-06-03 16:44:11 +00:00
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
|
|
|
|
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
|
2024-02-23 05:37:22 +00:00
|
|
|
|
2023-12-02 01:26:09 +00:00
|
|
|
- name: Prepare server
|
|
|
|
run: |
|
|
|
|
cd ./tests
|
2023-12-04 16:03:21 +00:00
|
|
|
./prepare-tests.sh
|
2021-09-12 07:37:22 +00:00
|
|
|
- name: Testing...
|
2024-02-12 16:57:11 +00:00
|
|
|
run: node common/scripts/install-run-rush.js test
|
2023-12-02 01:26:09 +00:00
|
|
|
env:
|
|
|
|
ELASTIC_URL: 'http://localhost:9201'
|
|
|
|
MONGO_URL: 'mongodb://localhost:27018'
|
2022-01-25 08:25:20 +00:00
|
|
|
uitest:
|
|
|
|
runs-on: ubuntu-latest
|
2024-04-02 14:17:38 +00:00
|
|
|
timeout-minutes: 60
|
2022-01-25 08:25:20 +00:00
|
|
|
steps:
|
2023-09-05 05:32:12 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-01-25 08:25:20 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-02-23 05:37:22 +00:00
|
|
|
filter: tree:0
|
2024-02-07 05:20:54 +00:00
|
|
|
- uses: actions/setup-node@v4
|
2024-02-06 02:57:31 +00:00
|
|
|
with:
|
|
|
|
node-version-file: '.nvmrc'
|
2024-02-23 05:37:22 +00:00
|
|
|
- name: Cache node modules
|
2024-01-18 05:45:06 +00:00
|
|
|
uses: actions/cache@v4
|
2022-01-25 08:25:20 +00:00
|
|
|
env:
|
2024-02-23 05:37:22 +00:00
|
|
|
cache-name: cache-node-platform
|
2022-01-25 08:25:20 +00:00
|
|
|
with:
|
2024-02-23 05:37:22 +00:00
|
|
|
path: |
|
|
|
|
common/temp
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
|
|
|
|
|
|
- name: Checking for mis-matching dependencies...
|
|
|
|
run: node common/scripts/install-run-rush.js check
|
|
|
|
|
|
|
|
- name: Installing...
|
|
|
|
run: node common/scripts/install-run-rush.js install
|
|
|
|
|
|
|
|
- name: Docker Build
|
|
|
|
run: node common/scripts/install-run-rush.js docker:build -p 20
|
2023-08-03 17:55:02 +00:00
|
|
|
env:
|
|
|
|
DOCKER_CLI_HINTS: false
|
2022-01-25 08:25:20 +00:00
|
|
|
- name: Prepare server
|
|
|
|
run: |
|
|
|
|
cd ./tests
|
2024-07-19 08:09:13 +00:00
|
|
|
export DO_CLEAN=true
|
2022-01-25 08:25:20 +00:00
|
|
|
./prepare.sh
|
|
|
|
- name: Install Playwright
|
|
|
|
run: |
|
|
|
|
cd ./tests/sanity
|
|
|
|
node ../../common/scripts/install-run-rushx.js ci
|
|
|
|
- name: Run UI tests
|
|
|
|
run: |
|
|
|
|
cd ./tests/sanity
|
|
|
|
node ../../common/scripts/install-run-rushx.js uitest
|
2023-06-21 05:33:00 +00:00
|
|
|
- name: "Store docker logs"
|
2023-06-22 08:22:37 +00:00
|
|
|
if: always()
|
2023-06-21 05:33:00 +00:00
|
|
|
run: |
|
|
|
|
cd ./tests/sanity
|
|
|
|
mkdir logs
|
|
|
|
docker logs $(docker ps | grep transactor | cut -f 1 -d ' ') > logs/transactor.log
|
2023-06-22 17:56:50 +00:00
|
|
|
docker logs $(docker ps | grep account | cut -f 1 -d ' ') > logs/account.log
|
2023-06-21 05:33:00 +00:00
|
|
|
docker logs $(docker ps | grep front | cut -f 1 -d ' ') > logs/front.log
|
2022-01-25 08:25:20 +00:00
|
|
|
- name: Upload test results
|
|
|
|
if: always()
|
2024-02-29 07:17:49 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-01-25 08:25:20 +00:00
|
|
|
with:
|
|
|
|
name: playwright-results
|
2023-06-22 08:22:37 +00:00
|
|
|
path: ./tests/sanity/playwright-report/
|
2024-07-19 08:09:13 +00:00
|
|
|
# - name: Get Allure history
|
|
|
|
# uses: actions/checkout@v4
|
|
|
|
# if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
|
|
|
|
# continue-on-error: true
|
|
|
|
# with:
|
|
|
|
# ref: gh-pages
|
|
|
|
# path: gh-pages
|
|
|
|
# - name: Generates Allure Report
|
|
|
|
# uses: simple-elf/allure-report-action@master
|
|
|
|
# if: always()
|
|
|
|
# id: allure-report
|
|
|
|
# with:
|
|
|
|
# allure_results: ./tests/sanity/allure-results/
|
|
|
|
# gh_pages: gh-pages
|
|
|
|
# allure_report: allure-report
|
|
|
|
# allure_history: allure-history
|
|
|
|
# - name: Upload allure test results
|
|
|
|
# if: always()
|
|
|
|
# uses: actions/upload-artifact@v4
|
|
|
|
# with:
|
|
|
|
# name: allure-report
|
|
|
|
# path: ./allure-report/
|
|
|
|
# - name: Deploy report to Github Pages
|
|
|
|
# if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
|
|
|
|
# uses: peaceiris/actions-gh-pages@v4
|
|
|
|
# with:
|
|
|
|
# PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# PUBLISH_BRANCH: gh-pages
|
|
|
|
# PUBLISH_DIR: allure-history
|
2023-06-22 08:22:37 +00:00
|
|
|
- name: Upload Logs
|
|
|
|
if: always()
|
2024-02-29 07:17:49 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-06-22 08:22:37 +00:00
|
|
|
with:
|
|
|
|
name: docker-logs
|
|
|
|
path: ./tests/sanity/logs
|
2023-06-20 05:47:00 +00:00
|
|
|
# - name: Upload DB snapshot
|
|
|
|
# if: always()
|
|
|
|
# uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: db-snapshot
|
|
|
|
# path: ./tests/db_dump
|
2024-07-13 15:23:11 +00:00
|
|
|
uitest-qms:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 60
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
filter: tree:0
|
|
|
|
- uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version-file: '.nvmrc'
|
|
|
|
- name: Cache node modules
|
|
|
|
uses: actions/cache@v4
|
|
|
|
env:
|
|
|
|
cache-name: cache-node-platform
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
common/temp
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
|
|
|
|
|
|
- name: Checking for mis-matching dependencies...
|
|
|
|
run: node common/scripts/install-run-rush.js check
|
|
|
|
|
|
|
|
- name: Installing...
|
|
|
|
run: node common/scripts/install-run-rush.js install
|
|
|
|
|
|
|
|
- name: Docker Build
|
|
|
|
run: node common/scripts/install-run-rush.js docker:build -p 20
|
|
|
|
env:
|
|
|
|
DOCKER_CLI_HINTS: false
|
|
|
|
- name: Prepare server
|
|
|
|
run: |
|
|
|
|
cd ./qms-tests
|
2024-07-19 08:09:13 +00:00
|
|
|
export DO_CLEAN=true
|
2024-07-13 15:23:11 +00:00
|
|
|
./prepare.sh
|
|
|
|
- name: Install Playwright
|
|
|
|
run: |
|
|
|
|
cd ./qms-tests/sanity
|
|
|
|
node ../../common/scripts/install-run-rushx.js ci
|
|
|
|
- name: Run UI tests
|
|
|
|
run: |
|
|
|
|
cd ./qms-tests/sanity
|
|
|
|
node ../../common/scripts/install-run-rushx.js uitest
|
|
|
|
- name: "Store docker logs"
|
|
|
|
if: always()
|
|
|
|
run: |
|
|
|
|
cd ./qms-tests/sanity
|
|
|
|
mkdir logs
|
|
|
|
docker logs $(docker ps | grep transactor | cut -f 1 -d ' ') > logs/transactor.log
|
|
|
|
docker logs $(docker ps | grep account | cut -f 1 -d ' ') > logs/account.log
|
|
|
|
docker logs $(docker ps | grep front | cut -f 1 -d ' ') > logs/front.log
|
|
|
|
- name: Upload test results
|
|
|
|
if: always()
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: playwright-results-qms
|
|
|
|
path: ./qms-tests/sanity/playwright-report/
|
|
|
|
# - name: Get Allure history
|
|
|
|
# uses: actions/checkout@v4
|
|
|
|
# if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
|
|
|
|
# continue-on-error: true
|
|
|
|
# with:
|
|
|
|
# ref: gh-pages
|
|
|
|
# path: gh-pages
|
|
|
|
# - name: Generates Allure Report
|
|
|
|
# uses: simple-elf/allure-report-action@master
|
|
|
|
# if: always()
|
|
|
|
# id: allure-report
|
|
|
|
# with:
|
|
|
|
# allure_results: ./qms-tests/sanity/allure-results/
|
|
|
|
# gh_pages: gh-pages
|
|
|
|
# allure_report: allure-report
|
|
|
|
# allure_history: allure-history
|
|
|
|
# - name: Upload allure test results
|
|
|
|
# if: always()
|
|
|
|
# uses: actions/upload-artifact@v4
|
|
|
|
# with:
|
|
|
|
# name: allure-report-qms
|
|
|
|
# path: ./allure-report/
|
|
|
|
# - name: Deploy report to Github Pages
|
|
|
|
# if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
|
|
|
|
# uses: peaceiris/actions-gh-pages@v4
|
|
|
|
# with:
|
|
|
|
# PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# PUBLISH_BRANCH: gh-pages
|
|
|
|
# PUBLISH_DIR: allure-history
|
|
|
|
- name: Upload Logs
|
|
|
|
if: always()
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: docker-logs-qms
|
|
|
|
path: ./qms-tests/sanity/logs
|
2024-05-06 09:15:39 +00:00
|
|
|
uitest-uweb:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 60
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
filter: tree:0
|
|
|
|
- uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version-file: '.nvmrc'
|
|
|
|
- name: Cache node modules
|
|
|
|
uses: actions/cache@v4
|
|
|
|
env:
|
|
|
|
cache-name: cache-node-platform
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
common/temp
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
|
|
|
|
|
|
- name: Checking for mis-matching dependencies...
|
|
|
|
run: node common/scripts/install-run-rush.js check
|
|
|
|
|
|
|
|
- name: Installing...
|
|
|
|
run: node common/scripts/install-run-rush.js install
|
|
|
|
|
|
|
|
- name: Docker Build
|
|
|
|
run: node common/scripts/install-run-rush.js docker:build -p 20
|
|
|
|
env:
|
|
|
|
DOCKER_CLI_HINTS: false
|
|
|
|
- name: Prepare server
|
|
|
|
env:
|
|
|
|
SERVER_PROVIDER: uweb
|
|
|
|
run: |
|
|
|
|
cd ./tests
|
|
|
|
./prepare.sh
|
|
|
|
- name: Install Playwright
|
|
|
|
run: |
|
|
|
|
cd ./tests/sanity
|
|
|
|
node ../../common/scripts/install-run-rushx.js ci
|
|
|
|
- name: Run UI tests
|
|
|
|
run: |
|
|
|
|
cd ./tests/sanity
|
|
|
|
node ../../common/scripts/install-run-rushx.js uitest
|
|
|
|
- name: "Store docker logs"
|
|
|
|
if: always()
|
|
|
|
run: |
|
|
|
|
cd ./tests/sanity
|
|
|
|
mkdir logs
|
|
|
|
docker logs $(docker ps | grep transactor | cut -f 1 -d ' ') > logs/uweb-transactor.log
|
|
|
|
docker logs $(docker ps | grep account | cut -f 1 -d ' ') > logs/uweb-account.log
|
|
|
|
docker logs $(docker ps | grep front | cut -f 1 -d ' ') > logs/uweb-front.log
|
|
|
|
- name: Upload test results
|
|
|
|
if: always()
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: playwright-results-uweb
|
|
|
|
path: ./tests/sanity/playwright-report/
|
|
|
|
- name: Upload Logs
|
|
|
|
if: always()
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: docker-logs-uweb
|
|
|
|
path: ./tests/sanity/logs
|
|
|
|
# - name: Upload DB snapshot
|
|
|
|
# if: always()
|
|
|
|
# uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: db-snapshot
|
|
|
|
# path: ./tests/db_dump
|
2024-01-20 04:00:16 +00:00
|
|
|
docker-build:
|
2024-02-23 05:37:22 +00:00
|
|
|
needs: [build, test, svelte-check, uitest]
|
2022-02-23 16:10:43 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-04-02 14:17:38 +00:00
|
|
|
timeout-minutes: 60
|
2022-02-23 16:10:43 +00:00
|
|
|
steps:
|
2023-09-05 05:32:12 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-02-23 16:10:43 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-02-23 05:37:22 +00:00
|
|
|
filter: tree:0
|
2024-02-07 05:20:54 +00:00
|
|
|
- uses: actions/setup-node@v4
|
2024-02-06 02:57:31 +00:00
|
|
|
with:
|
|
|
|
node-version-file: '.nvmrc'
|
2024-02-23 05:37:22 +00:00
|
|
|
- name: Cache node modules
|
2024-01-18 05:45:06 +00:00
|
|
|
uses: actions/cache@v4
|
2022-02-23 16:10:43 +00:00
|
|
|
env:
|
2024-02-23 05:37:22 +00:00
|
|
|
cache-name: cache-node-platform
|
2022-02-23 16:10:43 +00:00
|
|
|
with:
|
2024-02-23 05:37:22 +00:00
|
|
|
path: |
|
|
|
|
common/temp
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
|
|
|
2024-01-23 16:18:36 +00:00
|
|
|
- name: Installing...
|
|
|
|
run: node common/scripts/install-run-rush.js install
|
|
|
|
|
|
|
|
- name: Model version from git tags
|
|
|
|
run: node common/scripts/install-run-rush.js model-version
|
|
|
|
|
2022-02-23 16:10:43 +00:00
|
|
|
- name: Docker build
|
2024-02-23 05:37:22 +00:00
|
|
|
run: node common/scripts/install-run-rush.js docker:build -p 20
|
2023-08-03 17:55:02 +00:00
|
|
|
env:
|
|
|
|
DOCKER_CLI_HINTS: false
|
2022-02-23 16:10:43 +00:00
|
|
|
- name: Login to Docker Hub
|
2024-02-03 10:50:10 +00:00
|
|
|
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
|
2023-09-14 03:23:22 +00:00
|
|
|
uses: docker/login-action@v3
|
2022-02-23 16:10:43 +00:00
|
|
|
with:
|
|
|
|
username: hardcoreeng
|
|
|
|
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
|
|
|
- name: Docker push staging
|
|
|
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
|
|
run: node common/scripts/install-run-rush.js docker:staging
|
|
|
|
- name: Docker push tag
|
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
|
|
run: |
|
|
|
|
echo Pushing release of tag ${{ github.ref }}
|
|
|
|
node common/scripts/install-run-rush.js docker:push
|