name: CI

on: [ push ]

jobs:
  test-clj:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Install Lein
        uses: DeLaGuardo/setup-clojure@master
        with:
          lein: 'latest'
      - name: Run Tests
        run: lein test
  test-cljs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Prepare Java
        uses: actions/setup-java@v2
        with:
          distribution: 'temurin'
          java-version: '8'
      - name: Install Node
        uses: actions/setup-node@v2
        with:
          node-version: '14'
      - run: npm install
      - name: Install shadow-cljs
        run: npm install -g shadow-cljs
      - name: Run Tests
        run: shadow-cljs compile test && node out/node-tests.js
