ci: add basic CI with github actions #1
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: Test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
docker: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Start containers | |
run: docker-compose -f "docker-compose.yml" up redis toxiproxy -d --build | |
- name: Install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
- name: Install dependencies | |
run: npm install | |
- name: Run tests | |
run: npm run test | |
- name: Stop containers | |
run: docker-compose -f "docker-compose.yml" down |