Skip to content

Commit 036140b

Browse files
Migrate to GH Actions (#146)
* Migrate to GH Actions * Implement caching * Remove comments for creating a Database * Synchronize .tool-version with CI one * Cache only the rebar directory, not the build * Remove TravisCI integration * Keep OTP version consistent * Cache the _build directory as well * Replace macro with branch name Co-authored-by: DXTimer <[email protected]>
1 parent 4b3d0b2 commit 036140b

File tree

3 files changed

+72
-19
lines changed

3 files changed

+72
-19
lines changed

.github/workflows/ci.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [ "main" ]
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
env:
14+
OTP_VERSION: "24.1"
15+
16+
jobs:
17+
build:
18+
name: Build
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
24+
- uses: erlef/setup-beam@v1
25+
with:
26+
otp-version: ${{ env.OTP_VERSION }}
27+
28+
- uses: actions/cache@v3
29+
with:
30+
path: |
31+
~/.cache/rebar3
32+
_build
33+
key: ${{ runner.os }}-erlang-${{ env.OTP_VERSION }}-${{ hashFiles('**/*rebar.lock') }}
34+
35+
- run: make build
36+
37+
test:
38+
name: Test
39+
runs-on: ubuntu-latest
40+
needs:
41+
- build
42+
43+
steps:
44+
- uses: actions/checkout@v3
45+
46+
- uses: erlef/setup-beam@v1
47+
with:
48+
otp-version: ${{ env.OTP_VERSION }}
49+
50+
- uses: actions/cache@v3
51+
with:
52+
path: |
53+
~/.cache/rebar3
54+
_build
55+
key: ${{ runner.os }}-erlang-${{ env.OTP_VERSION }}-${{ hashFiles('**/*rebar.lock') }}
56+
57+
- run: make test
58+
59+
slack-workflow-status:
60+
if: always()
61+
name: Post Workflow Status To Slack
62+
needs:
63+
- build
64+
- test
65+
runs-on: ubuntu-latest
66+
steps:
67+
- name: Slack Workflow Notification
68+
uses: Gamesight/slack-workflow-status@master
69+
with:
70+
repo_token: ${{secrets.GITHUB_TOKEN}}
71+
slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL_DEVELOPMENT}}

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
erlang 24.0.5
1+
erlang 24.1

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)