Skip to content

Commit

Permalink
Migrated from Travis CI to Github Actions. (#6)
Browse files Browse the repository at this point in the history
Signed-off-by: Hermann Mayer <[email protected]>
  • Loading branch information
Jack12816 authored Sep 6, 2021
1 parent da1aa02 commit b45660a
Show file tree
Hide file tree
Showing 17 changed files with 121 additions and 93 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .travis/Makefile → .github/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ build:
# Setup a build environment
@$(DOCKER) build -t $(MODULE):build .
@$(DOCKER) run --rm -v $(shell pwd)/..:/build $(MODULE):build bash -c \
'make -C /build/.travis build-module'
'make -C /build/.github build-module'

build-module: clean install .find-deps
# Build $(MODULE) module from source
Expand Down
2 changes: 2 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tag-template: $NEXT_MINOR_VERSION
template: $CHANGES
File renamed without changes.
33 changes: 33 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Package
on:
release:
types: [published]

concurrency:
group: '${{ github.event_name }}'
cancel-in-progress: false

jobs:
package:
name: Build the module package
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
- name: Prepare the virtual environment
uses: hausgold/actions/ci@master
with:
clone_token: '${{ secrets.CLONE_TOKEN }}'
settings: '${{ github.repository }}'
target: ci/docker
- uses: actions/checkout@v2

- name: Configure the module version
run: var MOD_VERSION ${APP_REF}

- name: Build the module
run: make -C .github build package

- name: Upload built module package
run: >
release-asset '${{ github.event.release.id }}'
".github/ejabberd-unread-${MOD_VERSION}.tar.gz"
17 changes: 17 additions & 0 deletions .github/workflows/process.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Process

on:
push:
branches:
- main
- master

jobs:
release_drafter:
name: Update release draft
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50 changes: 50 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test
on:
push:
branches:
- '**'
schedule:
- cron: '0 0 * * MON'

concurrency:
group: '${{ github.ref }}'
cancel-in-progress: true

jobs:
test:
name: Test the module
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- name: Prepare the virtual environment
uses: hausgold/actions/ci@master
with:
clone_token: '${{ secrets.CLONE_TOKEN }}'
settings: '${{ github.repository }}'
target: ci/docker
- uses: actions/checkout@v2

- name: Install the module dependencies
run: make install

- name: Start the module dependencies
run: START=background make start reload

- name: Run the module tests
run: make test

build:
name: Build the module
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- name: Prepare the virtual environment
uses: hausgold/actions/ci@master
with:
clone_token: '${{ secrets.CLONE_TOKEN }}'
settings: '${{ github.repository }}'
target: ci/docker
- uses: actions/checkout@v2

- name: Build the module
run: make -C .github build
60 changes: 0 additions & 60 deletions .travis.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .travis/exe/docker-glue

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## next

* Migrated from Travis CI to Github Actions (#6)

## 1.0.4

* Improved the MAM result manipulation to directly change the XML elements
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 HAUSGOLD
Copyright (c) 2021 HAUSGOLD | talocasa GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,19 @@ COMPOSE := $(COMPOSE) -p $(PROJECT_NAME)
@$(eval BASH_RUN_SHELL_CONTAINER = jabber)
@$(eval COMPOSE_RUN_COMMAND = exec)
@$(eval BASH_RUN_SHELL_USER = root)
@$(eval COMPOSE_RUN_SHELL_FLAGS = )
@$(eval COMPOSE_RUN_SHELL_FLAGS = -T)

.database:
@$(eval BASH_RUN_SHELL_CONTAINER = db)
@$(eval COMPOSE_RUN_COMMAND = exec)
@$(eval BASH_RUN_SHELL_USER = root)
@$(eval COMPOSE_RUN_SHELL_FLAGS = )
@$(eval COMPOSE_RUN_SHELL_FLAGS = -T)

.test:
@$(eval BASH_RUN_SHELL_CONTAINER = jabber)
@$(eval COMPOSE_RUN_COMMAND = exec)
@$(eval BASH_RUN_SHELL_USER = app)
@$(eval COMPOSE_RUN_SHELL_FLAGS = )
@$(eval COMPOSE_RUN_SHELL_FLAGS = -T)

.disable-module-conf:
# Disable $(MODULE) configuration
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![ejabberd-unread](doc/assets/project.svg)

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

This is a custom [ejabberd](https://www.ejabberd.im/) module which allows users
to acknowledge/retrieve their unread messages from direct chats and multi user
Expand Down
2 changes: 1 addition & 1 deletion include/mod_unread.hrl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
-define(MODULE_VERSION, <<"1.0.4-471">>).
-define(MODULE_VERSION, <<"1.0.4-472">>).
-define(NS_UNREAD, <<"urn:xmpp:unread">>).
12 changes: 6 additions & 6 deletions tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"colors": "^1.3.1",
"css2json": "0.0.4",
"faker": "^4.1.0",
"highlight.js": "^9.12.0",
"highlight.js": "^10.4.1",
"html2json": "^1.0.2",
"lodash": "^4.17.15",
"lodash": "^4.17.21",
"moment": "^2.27.0",
"pg": "^8.2.2",
"request": "^2.87.0",
Expand Down

0 comments on commit b45660a

Please sign in to comment.