ci: add build/test jobs
parent
923b25697c
commit
18a37f971e
|
@ -3,6 +3,34 @@ name: Build and test
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Run tests
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '16'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Run linter
|
||||||
|
run: npm run lint
|
||||||
|
- name: Run tests
|
||||||
|
run: npm test
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '16'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
name: Build Docker image
|
name: Build Docker image
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
@ -34,19 +62,3 @@ jobs:
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
# lint:
|
|
||||||
# name: Run linter
|
|
||||||
# runs-on: ubuntu-20.04
|
|
||||||
# needs: docker
|
|
||||||
# steps:
|
|
||||||
# - name: Run linter
|
|
||||||
# run: docker run --rm retropilot-server:latest npm run lint
|
|
||||||
|
|
||||||
# test:
|
|
||||||
# name: Run tests
|
|
||||||
# runs-on: ubuntu-20.04
|
|
||||||
# needs: docker
|
|
||||||
# steps:
|
|
||||||
# - name: Run tests
|
|
||||||
# run: docker run --rm --env-file .env.sample -v /tmp/realdata:/app/realdata retropilot-server:latest npm test
|
|
||||||
|
|
Loading…
Reference in New Issue