-
-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (38 loc) · 1.25 KB
/
continuous-integration-workflow.yml
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
name: ci
on: [push]
jobs:
test:
name: Test
runs-on: ubuntu-20.04
container:
# Source: https://github.com/day8/dockerfile-for-dev-ci-image
image: ghcr.io/day8/dockerfile-for-dev-ci-image/core:2
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
# All of the Git history is required for day8/lein-git-inject to determine the version string.
fetch-depth: 0
- name: Maven cache
uses: actions/cache@v2
with:
path: /root/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('project.clj', '.github/workflows/**') }}
restore-keys: |
${{ runner.os }}-maven-
- run: lein test
if: steps.maven-cache.outputs.cache-hit != 'true'
- run: lein -o test
if: steps.maven-cache.outputs.cache-hit == 'true'
- name: Slack notification
uses: homoluctus/slatify@v2.0.1
if: failure() || cancelled()
with:
type: ${{ job.status }}
job_name: lein-git-inject Tests
channel: '#oss-robots'
url: ${{ secrets.SLACK_WEBHOOK }}
commit: true
token: ${{ secrets.GITHUB_TOKEN }}