add github action worflow for testing and linting #8
Workflow file for this run
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: build and test | |
on: | |
push: | |
branches: | |
- "*" | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- reopened | |
- synchronize | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- name: install dependencies | |
run: npm install | |
- name: linting | |
run: npm run style | |
- name: testing | |
run: npm run test | |
- name: compiling typescript | |
run: | | |
npm run clean | |
npm run build | |
build-docker: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: build docker image | |
run: docker build -t ghcr.io/tromai/lemon-soda:testing -f Dockerfile ./ |