Skip to content

fix ci

fix ci #12

Workflow file for this run

name: Development CI
on:
push:
branches: [ dev, develop, development ]
pull_request:
branches: [ main, master, dev, develop, development ]
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libssl3
- name: Install dependencies
run: |
npm install
npm install [email protected] --save-dev
npm install [email protected] [email protected] [email protected] --save-dev
- name: Run linter
run: npm run lint
- name: Run unit tests
run: npm run test:unit
env:
PARSE_MASTER_KEY: 'test-master-key'
PARSE_APP_ID: 'test-app-id'
MONGOMS_VERSION: "6.0.2"
MONGOMS_DOWNLOAD_URL: "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-6.0.2.tgz"
MONGOMS_SYSTEM_BINARY: "/usr/bin/mongod"
integration-tests:
runs-on: ubuntu-latest
needs: unit-tests
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libssl3
- name: Install dependencies
run: npm ci
- name: Run integration tests
run: npm run test:integration
env:
PARSE_MASTER_KEY: 'test-master-key'
PARSE_APP_ID: 'test-app-id'
MONGOMS_VERSION: "6.0.2"
MONGOMS_DOWNLOAD_URL: "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-6.0.2.tgz"
MONGOMS_SYSTEM_BINARY: "/usr/bin/mongod"
main-tests:
runs-on: ubuntu-latest
needs: unit-tests
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libssl3
- name: Install dependencies
run: npm ci
- name: Run main tests
run: npm run test:main
env:
PARSE_MASTER_KEY: 'test-master-key'
PARSE_APP_ID: 'test-app-id'
MONGOMS_VERSION: "6.0.2"
MONGOMS_DOWNLOAD_URL: "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-6.0.2.tgz"
MONGOMS_SYSTEM_BINARY: "/usr/bin/mongod"
build:
needs: [unit-tests, integration-tests, main-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install dependencies
run: npm ci
- name: Build package
run: npm pack
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: package
path: "*.tgz"