fix: replace docker-compose by docker compose due to GitHub removing … #372
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x, 15.x] | |
mongodb-version: [4.2] | |
elasticsearch-version: ['7.9.3'] | |
rabbitmq-version: ['3.8.2-management-alpine'] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Launch MongoDB | |
uses: wbari/[email protected] | |
with: | |
mongoDBVersion: ${{ matrix.mongodb-version }} | |
- name: Launch RabbitMQ | |
uses: nijel/[email protected] | |
with: | |
rabbitmq version: ${{ matrix.rabbitmq-version }} | |
- name: Configure sysctl limits | |
run: | | |
sudo swapoff -a | |
sudo sysctl -w vm.swappiness=1 | |
sudo sysctl -w fs.file-max=262144 | |
sudo sysctl -w vm.max_map_count=262144 | |
- name: Launch elasticsearch | |
uses: getong/[email protected] | |
with: | |
elasticsearch version: ${{ matrix.elasticsearch-version }} | |
host port: 9200 | |
container port: 9200 | |
host node port: 9300 | |
node port: 9300 | |
discovery type: 'single-node' | |
- name: npm install | |
run: | | |
npm install | |
- name: npm run build | |
run: | | |
npm run build --if-present | |
npm run lint | |
- name: npm test | |
run: | | |
npm test | |
- name: Cypress run | |
uses: cypress-io/github-action@v1 | |
env: | |
NODE_ENV: end2end | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
with: | |
start: npm run cypress:ci:start |