Skip to content

Deserialize json-post only if ok. #120

Deserialize json-post only if ok.

Deserialize json-post only if ok. #120

Workflow file for this run

# Lifted from github.com/squint-cljs/cherry
name: Tests
on: [push, pull_request]
env:
SECRET: testing
TESTING: 1
DATABASE_URL: sqlite://./tests.sqlite
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest] # windows-latest
version: [16, 18, 20]
runs-on: ${{ matrix.os }}
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
- name: Prepare java
uses: actions/setup-java@v4
with:
distribution: "adopt"
java-version: 11
- name: Setup Clojure
uses: DeLaGuardo/[email protected]
with:
cli: 1.10.3.1040
- name: Cache clojure dependencies
uses: actions/cache@v4
with:
path: |
~/.m2/repository
~/.gitlibs
~/.deps.clj
# List all files containing dependencies:
key: cljdeps-${{ hashFiles('shadow-cljs.edn') }}
# key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }}
# key: cljdeps-${{ hashFiles('project.clj') }}
# key: cljdeps-${{ hashFiles('build.boot') }}
restore-keys: cljdeps-
- name: Install Node deps
run: npm i
- name: Run the tests
run: npm run test
- name: Run the e2e tests
run: npm run test-e2e
- name: Set up PostgreSQL
run: |
sudo apt install postgresql libpq-dev
sudo service postgresql start
sudo -u postgres createuser --superuser "$USER"
if: runner.os == 'Linux'
- name: Run the tests on Postgres
run: npm run test-postgres
if: runner.os == 'Linux'