mirror of
https://github.com/chatmail/core.git
synced 2026-04-02 05:22:14 +03:00
* set timeout for node ci tests to 10min set timeout for node ci tests to 10min for the test step, macOS takes 12min for the whole workflow with cached core build, so 10min just for the test step should be plenty. * don't forget to set the limit on windows, too
70 lines
1.6 KiB
YAML
70 lines
1.6 KiB
YAML
name: 'node.js tests'
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
- staging
|
|
- trying
|
|
|
|
jobs:
|
|
tests:
|
|
name: 'tests'
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-18.04, macos-latest, windows-latest]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '16'
|
|
- name: System info
|
|
run: |
|
|
rustc -vV
|
|
rustup -vV
|
|
cargo -vV
|
|
npm --version
|
|
node --version
|
|
|
|
- name: Cache node modules
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
${{ env.APPDATA }}/npm-cache
|
|
~/.npm
|
|
key: ${{ matrix.os }}-node-${{ hashFiles('**/package.json') }}
|
|
|
|
- name: Cache cargo index
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/registry/
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ matrix.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}-2
|
|
|
|
- name: Install dependencies & build
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
run: |
|
|
cd node
|
|
npm install --verbose
|
|
|
|
- name: Test
|
|
timeout-minutes: 10
|
|
if: runner.os != 'Windows'
|
|
run: |
|
|
cd node
|
|
npm run test
|
|
env:
|
|
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|
|
- name: Run tests on Windows, except lint
|
|
timeout-minutes: 10
|
|
if: runner.os == 'Windows'
|
|
run: |
|
|
cd node
|
|
npm run test:mocha
|
|
env:
|
|
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|