mirror of
https://github.com/OHTU-German-learning-website/OHTU-German-learning-website.git
synced 2026-10-12 19:13:51 +03:00
add gh workflow (#1)
* add gh workflow * cache node_modules * cache subdir
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
name: Lint, format and test (and deploy)
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
lint-format-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Start databases
|
||||
run: docker compose up -d
|
||||
- name: Cache Node.js modules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./client/node_modules
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('./client/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
cache-dependency-path: ./client/package-lock.json
|
||||
node-version: 22.6
|
||||
cache: "npm"
|
||||
- name: Install client dependencies
|
||||
run: npm install
|
||||
working-directory: ./client
|
||||
- name: Run tests
|
||||
run: echo "All good"
|
||||
Reference in New Issue
Block a user