fix: contextline tests #33
This file contains hidden or 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: Frontend CI | |
on: | |
push: | |
branches: | |
- "**" | |
jobs: | |
test: | |
name: Unit and snapshot tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Copy config file | |
run: cp config.example.js config.js | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: "npm" | |
- name: Clean node_modules and lockfile | |
run: rm -rf node_modules package-lock.json | |
- name: Install project dependencies | |
run: npm install | |
- name: Run tests | |
run: npm run test | |
build: | |
name: Build the project like on production deployment | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Copy the config file for the vis | |
run: cp config.example.js config.js | |
- name: Setup Node.JS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: "npm" | |
- name: Install all project dependencies | |
run: npm ci | |
- name: Build the project (prod) | |
run: npx webpack |