-
Notifications
You must be signed in to change notification settings - Fork 3
80 lines (74 loc) · 2.38 KB
/
Copy pathlein-test.yaml
File metadata and controls
80 lines (74 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
name: lein_test
on:
pull_request: {}
push:
branches:
- main
concurrency:
group: lein-test-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read # minimal required permissions to clone repo
jobs:
run-lein-tests:
name: lein test - Java ${{ matrix.java }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
java:
- '25'
- '21'
steps:
- name: Check out repository code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup java
uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5.5.0
with:
distribution: temurin
java-version: ${{ matrix.java }}
- name: Install Clojure tools
uses: DeLaGuardo/setup-clojure@4c7a6f613e5089821bb3bb2a33a3ee115578580d # 13.6.1
with:
cli: latest # Clojure CLI based on tools.deps
lein: latest # Leiningen
boot: latest # Boot.clj
bb: latest # Babashka
clj-kondo: latest # Clj-kondo
cljstyle: latest # cljstyle
zprint: latest # zprint
- name: Run lein tests with update profile
run: |
set -x
set -e
lein version
echo "Running tests"
lein -U test
tests:
if: always()
needs:
- run-lein-tests
runs-on: ubuntu-24.04
name: Test suite
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}
automerge:
name: Enable auto-merge
if: github.event_name == 'pull_request' && (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'renovate[bot]')
needs:
- tests
runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: write
steps:
- name: Enable auto-merge for PR
env:
GH_TOKEN: ${{ github.token }}
PR_URL: ${{ github.event.pull_request.html_url }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: gh pr merge --auto --merge --match-head-commit "$PR_HEAD_SHA" "$PR_URL"