mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-28 01:48:11 +03:00
* Test 1: Async Wrapping * Revert "Test 1: Async Wrapping" This reverts commit 8f0e0d283686d367e18275684cc7858af0538515. * Pin github actions node version to the same as ours * Revert "Pin github actions node version to the same as ours" This reverts commit 3758ee05ef5647f608ef3fd1c85b88eb97e3f077. * Move lint step to after running tests * add a NO_CONSOLE config option * temporarily set log level to debug * Enable more mongodb logging in testing * Experimentally bundle before script into SPT. * run without any before * Revert "Experimentally bundle before script into SPT." * Revert "Enable more mongodb logging in testing" This reverts commit c11f918c850dc53cb49b262cb0b51141ac132aab. * Fix missing import * Re add the mongodb logging * Set LOG_LEVEL back to reasonable levels * Increase timeouts for mongo and redis connections * Change how codecov works * Use ServerSelectionTimeoutMS instead of connect * pls? * Bump TAP Timeout to 4 minutes, which we'll probably never hit.
81 lines
1.8 KiB
YAML
81 lines
1.8 KiB
YAML
name: Tachi-Server CI
|
|
|
|
env:
|
|
NODE_ENV: "test"
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
on:
|
|
push:
|
|
branches: [master, develop]
|
|
pull_request:
|
|
branches: [master, develop]
|
|
|
|
jobs:
|
|
test:
|
|
name: Build and Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Node.js 16
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 16.x
|
|
|
|
- name: Install PNPM
|
|
uses: pnpm/action-setup@v2.0.1
|
|
with:
|
|
version: 6.0.2
|
|
|
|
# configure external dbs
|
|
- uses: supercharge/mongodb-github-action@1.4.1
|
|
- uses: supercharge/redis-github-action@1.1.0
|
|
|
|
- name: Install Dependencies
|
|
run: pnpm i
|
|
|
|
- name: Move Config File
|
|
run: mv ./.github/test.conf.json5 ./test.conf.json5
|
|
|
|
- name: Run Tests
|
|
run: pnpm test
|
|
|
|
- name: Lint Code
|
|
run: pnpm lint
|
|
|
|
- name: Upload Coverage
|
|
if: always()
|
|
run: |
|
|
pnpm install -g codecov
|
|
cat coverage/lcov.info | codecov
|
|
# deploy:
|
|
# if: ${{ github.ref == 'master' }}
|
|
# needs: test
|
|
# name: Deploy
|
|
# runs-on: ubuntu-latest
|
|
# steps:
|
|
# - name: Checkout Code
|
|
# uses: actions/checkout@v2
|
|
|
|
# - name: Install Node.js 15
|
|
# uses: actions/setup-node@v2
|
|
# with:
|
|
# node-version: 15.x
|
|
|
|
# - name: Install PNPM
|
|
# uses: pnpm/action-setup@v2.0.1
|
|
# with:
|
|
# version: 6.0.2
|
|
|
|
# # configure external dbs
|
|
# - uses: supercharge/mongodb-github-action@1.4.1
|
|
# - uses: supercharge/redis-github-action@1.1.0
|
|
|
|
# - name: Install Dependencies
|
|
# run: pnpm i
|
|
|
|
# # for the time being, disable lint checking.
|
|
# # - name: Lint Code
|
|
# # run: pnpm lint
|