mirror of
https://github.com/HabitRPG/habitica.git
synced 2026-03-13 08:41:14 +08:00
* chore(mongodb): update local dev MongoDB versions * fix(github): update mongodb-github-action * test(api): attempt to gather more detail on failures * Revert "test(api): attempt to gather more detail on failures" This reverts commit215e768e90. * WIP mongodb-memory-serve * fix(mongo): start replica set * run mongo as gh action service * remove matrix for mongo * try npm -> docker instead of services * try "docker compose" * disable mongo bootstrap from build * try gh action again * try newer action version * working mongo docker compose 🎉 * fix(lint): leave out unused imports * update lock * cleanup previous workflow changes * remove previous code, dont share mongo data folders on runtype (rs and docker) * mongo docker for testing; align mongodb directory naming * remove run-rs, add docker:aio script call, use healthcheck to initiate again * merge docker-compose.yml, fix client port listening * fix oudated healthcheck param * chore(mongodb): update local dev MongoDB versions * fix(github): update mongodb-github-action * test(api): attempt to gather more detail on failures * Revert "test(api): attempt to gather more detail on failures" This reverts commit215e768e90. * WIP mongodb-memory-serve * run mongo as gh action service * fix(mongo): start replica set * remove matrix for mongo * try npm -> docker instead of services * try "docker compose" * disable mongo bootstrap from build * try gh action again * try newer action version * working mongo docker compose 🎉 * fix(lint): leave out unused imports * update lock * cleanup previous workflow changes * remove previous code, dont share mongo data folders on runtype (rs and docker) * mongo docker for testing; align mongodb directory naming * remove run-rs, add docker:aio script call, use healthcheck to initiate again * merge docker-compose.yml, fix client port listening * fix oudated healthcheck param * fix(config): remove dup keys * using npx vite during docker aio run --------- Co-authored-by: negue <eugen.bolz@gmail.com>
284 lines
6.7 KiB
YAML
284 lines
6.7 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- 'phillip/**'
|
|
- 'sabrecat/**'
|
|
- 'kalista/**'
|
|
- 'natalie/**'
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [21.x]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- run: sudo apt update
|
|
- run: sudo apt -y install libkrb5-dev
|
|
- run: cp config.json.example config.json
|
|
- name: npm install
|
|
run: |
|
|
npm i
|
|
env:
|
|
CI: true
|
|
NODE_ENV: test
|
|
- run: npm run lint-no-fix
|
|
apidoc:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [21.x]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- run: sudo apt update
|
|
- run: sudo apt -y install libkrb5-dev
|
|
- run: cp config.json.example config.json
|
|
- name: npm install
|
|
run: |
|
|
npm i
|
|
env:
|
|
CI: true
|
|
NODE_ENV: test
|
|
- run: npm run apidoc
|
|
sanity:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [21.x]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- run: sudo apt update
|
|
- run: sudo apt -y install libkrb5-dev
|
|
- run: cp config.json.example config.json
|
|
- name: npm install
|
|
run: |
|
|
npm i
|
|
env:
|
|
CI: true
|
|
NODE_ENV: test
|
|
- run: npm run test:sanity
|
|
|
|
common:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [21.x]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- run: sudo apt update
|
|
- run: sudo apt -y install libkrb5-dev
|
|
- run: cp config.json.example config.json
|
|
- name: npm install
|
|
run: |
|
|
npm i
|
|
env:
|
|
CI: true
|
|
NODE_ENV: test
|
|
- run: npm run test:common
|
|
content:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [21.x]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- run: sudo apt update
|
|
- run: sudo apt -y install libkrb5-dev
|
|
- run: cp config.json.example config.json
|
|
- name: npm install
|
|
run: |
|
|
npm i
|
|
env:
|
|
CI: true
|
|
NODE_ENV: test
|
|
- run: npm run test:content
|
|
|
|
api-unit:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [21.x]
|
|
mongodb-version: [7.0]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Start MongoDB ${{ matrix.mongodb-version }} Replica Set
|
|
uses: supercharge/mongodb-github-action@1.11.0
|
|
with:
|
|
mongodb-version: ${{ matrix.mongodb-version }}
|
|
mongodb-replica-set: rs
|
|
|
|
- run: sudo apt update
|
|
- run: sudo apt -y install libkrb5-dev
|
|
- run: cp config.json.example config.json
|
|
- name: npm install
|
|
run: |
|
|
npm i
|
|
env:
|
|
CI: true
|
|
NODE_ENV: test
|
|
|
|
- run: npm run test:api:unit
|
|
env:
|
|
REQUIRES_SERVER=true: true
|
|
|
|
api-v3-integration:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [21.x]
|
|
mongodb-version: [7.0]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- name: Start MongoDB ${{ matrix.mongodb-version }} Replica Set
|
|
uses: supercharge/mongodb-github-action@1.11.0
|
|
with:
|
|
mongodb-version: ${{ matrix.mongodb-version }}
|
|
mongodb-replica-set: rs
|
|
|
|
- run: sudo apt update
|
|
- run: sudo apt -y install libkrb5-dev
|
|
- run: cp config.json.example config.json
|
|
- name: npm install
|
|
run: |
|
|
npm i
|
|
env:
|
|
CI: true
|
|
NODE_ENV: test
|
|
|
|
- run: npm run test:api-v3:integration
|
|
env:
|
|
REQUIRES_SERVER=true: true
|
|
|
|
api-v4-integration:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [21.x]
|
|
mongodb-version: [7.0]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- name: Start MongoDB ${{ matrix.mongodb-version }} Replica Set
|
|
uses: supercharge/mongodb-github-action@1.11.0
|
|
with:
|
|
mongodb-version: ${{ matrix.mongodb-version }}
|
|
mongodb-replica-set: rs
|
|
|
|
- run: sudo apt update
|
|
- run: sudo apt -y install libkrb5-dev
|
|
- run: cp config.json.example config.json
|
|
- name: npm install
|
|
run: |
|
|
npm i
|
|
env:
|
|
CI: true
|
|
NODE_ENV: test
|
|
|
|
- run: npm run test:api-v4:integration
|
|
env:
|
|
REQUIRES_SERVER=true: true
|
|
|
|
client-unit:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [21.x]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- run: sudo apt update
|
|
- run: sudo apt -y install libkrb5-dev
|
|
- run: cp config.json.example config.json
|
|
- name: npm install
|
|
run: |
|
|
npm i
|
|
env:
|
|
CI: true
|
|
NODE_ENV: test
|
|
- run: npm run test:unit
|
|
working-directory: ./website/client
|
|
|
|
production-build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [21.x]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- run: sudo apt update
|
|
- run: sudo apt -y install libkrb5-dev
|
|
- run: cp config.json.example config.json
|
|
- name: npm install
|
|
run: |
|
|
npm install
|
|
env:
|
|
CI: true
|
|
NODE_ENV: production
|