-
Notifications
You must be signed in to change notification settings - Fork 5
92 lines (86 loc) · 2.58 KB
/
Copy pathtests.yml
File metadata and controls
92 lines (86 loc) · 2.58 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
81
82
83
84
85
86
87
88
89
90
91
92
---
name: PR Testing
on:
pull_request: {}
push:
branches:
- main
# minimal permissions
permissions:
contents: read
jobs:
clojure-linting:
name: Clojure Linting
runs-on: ubuntu-24.04
steps:
- name: setup java
uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5.5.0
with:
distribution: temurin
java-version: 21
- name: checkout repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install Clojure tools
uses: DeLaGuardo/setup-clojure@4c7a6f613e5089821bb3bb2a33a3ee115578580d # 13.6.1
with:
lein: latest
clj-kondo: latest
- name: kondo lint
run: clj-kondo --lint src test
- name: eastwood lint
run: lein eastwood
- name: output dependencies
run: lein deps :tree
run-lein-tests:
name: PR Testing
strategy:
fail-fast: false
matrix:
version: ['17', '21', '25']
runs-on: ubuntu-24.04
steps:
- name: checkout repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: recursive
- name: setup java
uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5.5.0
with:
distribution: 'temurin'
java-version: ${{ matrix.version }}
- name: Install Clojure tools
uses: DeLaGuardo/setup-clojure@4c7a6f613e5089821bb3bb2a33a3ee115578580d # 13.6.1
with:
lein: latest
- name: clojure tests
run: lein test
- name: run acceptance tests
run: lein uberjar && ext/test/run-all
tests:
if: always()
needs:
- clojure-linting
- 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@release/v1
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"