Update Clojure CI flow #3
This file contains 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: Clojure CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 # Substitua pela versão do JDK que seu projeto utiliza | |
- name: Install Leiningen | |
run: | | |
curl -O https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein | |
chmod +x lein | |
sudo mv lein /usr/local/bin/ | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-lein-${{ hashFiles('**/project.clj') }} | |
restore-keys: | | |
${{ runner.os }}-lein- | |
- name: Install dependencies | |
run: lein deps | |
- name: Run tests | |
run: lein test | |
- name: Verify code formatting (opcional) | |
run: lein cljfmt check |