Refactor client and improve testing #1
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: CI | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java-version: [11, 17, 21] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up JDK ${{ matrix.java-version }} | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: 'temurin' | |
| cache: 'lein' | |
| - name: Install dependencies | |
| run: lein deps | |
| - name: Run tests | |
| run: lein test | |
| - name: Check formatting | |
| run: lein cljfmt check | |
| deploy: | |
| needs: build | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| cache: 'lein' | |
| - name: Install dependencies | |
| run: lein deps | |
| - name: Deploy to Clojars | |
| env: | |
| CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }} | |
| CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }} | |
| run: lein deploy clojars |