Skip to content

Commit b45660a

Browse files
authored
Migrated from Travis CI to Github Actions. (#6)
Signed-off-by: Hermann Mayer <[email protected]>
1 parent da1aa02 commit b45660a

17 files changed

+121
-93
lines changed
File renamed without changes.
File renamed without changes.

.travis/Makefile .github/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ build:
6060
# Setup a build environment
6161
@$(DOCKER) build -t $(MODULE):build .
6262
@$(DOCKER) run --rm -v $(shell pwd)/..:/build $(MODULE):build bash -c \
63-
'make -C /build/.travis build-module'
63+
'make -C /build/.github build-module'
6464

6565
build-module: clean install .find-deps
6666
# Build $(MODULE) module from source

.github/release-drafter.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tag-template: $NEXT_MINOR_VERSION
2+
template: $CHANGES
File renamed without changes.

.github/workflows/package.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Package
2+
on:
3+
release:
4+
types: [published]
5+
6+
concurrency:
7+
group: '${{ github.event_name }}'
8+
cancel-in-progress: false
9+
10+
jobs:
11+
package:
12+
name: Build the module package
13+
runs-on: ubuntu-20.04
14+
timeout-minutes: 10
15+
steps:
16+
- name: Prepare the virtual environment
17+
uses: hausgold/actions/ci@master
18+
with:
19+
clone_token: '${{ secrets.CLONE_TOKEN }}'
20+
settings: '${{ github.repository }}'
21+
target: ci/docker
22+
- uses: actions/checkout@v2
23+
24+
- name: Configure the module version
25+
run: var MOD_VERSION ${APP_REF}
26+
27+
- name: Build the module
28+
run: make -C .github build package
29+
30+
- name: Upload built module package
31+
run: >
32+
release-asset '${{ github.event.release.id }}'
33+
".github/ejabberd-unread-${MOD_VERSION}.tar.gz"

.github/workflows/process.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Process
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
9+
jobs:
10+
release_drafter:
11+
name: Update release draft
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 3
14+
steps:
15+
- uses: release-drafter/release-drafter@v5
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Test
2+
on:
3+
push:
4+
branches:
5+
- '**'
6+
schedule:
7+
- cron: '0 0 * * MON'
8+
9+
concurrency:
10+
group: '${{ github.ref }}'
11+
cancel-in-progress: true
12+
13+
jobs:
14+
test:
15+
name: Test the module
16+
runs-on: ubuntu-20.04
17+
timeout-minutes: 5
18+
steps:
19+
- name: Prepare the virtual environment
20+
uses: hausgold/actions/ci@master
21+
with:
22+
clone_token: '${{ secrets.CLONE_TOKEN }}'
23+
settings: '${{ github.repository }}'
24+
target: ci/docker
25+
- uses: actions/checkout@v2
26+
27+
- name: Install the module dependencies
28+
run: make install
29+
30+
- name: Start the module dependencies
31+
run: START=background make start reload
32+
33+
- name: Run the module tests
34+
run: make test
35+
36+
build:
37+
name: Build the module
38+
runs-on: ubuntu-20.04
39+
timeout-minutes: 5
40+
steps:
41+
- name: Prepare the virtual environment
42+
uses: hausgold/actions/ci@master
43+
with:
44+
clone_token: '${{ secrets.CLONE_TOKEN }}'
45+
settings: '${{ github.repository }}'
46+
target: ci/docker
47+
- uses: actions/checkout@v2
48+
49+
- name: Build the module
50+
run: make -C .github build

.travis.yml

-60
This file was deleted.

.travis/exe/docker-glue

-18
This file was deleted.

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## next
2+
3+
* Migrated from Travis CI to Github Actions (#6)
4+
15
## 1.0.4
26

37
* Improved the MAM result manipulation to directly change the XML elements

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 HAUSGOLD
3+
Copyright (c) 2021 HAUSGOLD | talocasa GmbH
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,19 @@ COMPOSE := $(COMPOSE) -p $(PROJECT_NAME)
136136
@$(eval BASH_RUN_SHELL_CONTAINER = jabber)
137137
@$(eval COMPOSE_RUN_COMMAND = exec)
138138
@$(eval BASH_RUN_SHELL_USER = root)
139-
@$(eval COMPOSE_RUN_SHELL_FLAGS = )
139+
@$(eval COMPOSE_RUN_SHELL_FLAGS = -T)
140140

141141
.database:
142142
@$(eval BASH_RUN_SHELL_CONTAINER = db)
143143
@$(eval COMPOSE_RUN_COMMAND = exec)
144144
@$(eval BASH_RUN_SHELL_USER = root)
145-
@$(eval COMPOSE_RUN_SHELL_FLAGS = )
145+
@$(eval COMPOSE_RUN_SHELL_FLAGS = -T)
146146

147147
.test:
148148
@$(eval BASH_RUN_SHELL_CONTAINER = jabber)
149149
@$(eval COMPOSE_RUN_COMMAND = exec)
150150
@$(eval BASH_RUN_SHELL_USER = app)
151-
@$(eval COMPOSE_RUN_SHELL_FLAGS = )
151+
@$(eval COMPOSE_RUN_SHELL_FLAGS = -T)
152152

153153
.disable-module-conf:
154154
# Disable $(MODULE) configuration

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![ejabberd-unread](doc/assets/project.svg)
22

3-
[![Build Status](https://api.travis-ci.com/hausgold/ejabberd-unread.svg?token=4XcyqxxmkyBSSV3wWRt7&branch=master)](https://travis-ci.com/hausgold/ejabberd-unread)
3+
[![Test](https://github.com/hausgold/ejabberd-unread/actions/workflows/test.yml/badge.svg)](https://github.com/hausgold/ejabberd-unread/actions/workflows/test.yml)
44

55
This is a custom [ejabberd](https://www.ejabberd.im/) module which allows users
66
to acknowledge/retrieve their unread messages from direct chats and multi user

include/mod_unread.hrl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
-define(MODULE_VERSION, <<"1.0.4-471">>).
1+
-define(MODULE_VERSION, <<"1.0.4-472">>).
22
-define(NS_UNREAD, <<"urn:xmpp:unread">>).

tests/package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"colors": "^1.3.1",
1515
"css2json": "0.0.4",
1616
"faker": "^4.1.0",
17-
"highlight.js": "^9.12.0",
17+
"highlight.js": "^10.4.1",
1818
"html2json": "^1.0.2",
19-
"lodash": "^4.17.15",
19+
"lodash": "^4.17.21",
2020
"moment": "^2.27.0",
2121
"pg": "^8.2.2",
2222
"request": "^2.87.0",

0 commit comments

Comments
 (0)