Skip to content

Commit

Permalink
Merge pull request #36 from ProteinsWebTeam/github_actions
Browse files Browse the repository at this point in the history
GitHub actions to replace Travis CI
  • Loading branch information
gustavo-salazar authored Nov 24, 2020
2 parents 2d430bb + 74dedf3 commit db72fc7
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 43 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Unit and Funtional Testing

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: 🐍 - Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: '3.6'
- name: ⚙️ - Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: 🔎 - Runs Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 7.3.0
- name: ⚙️🔎 - Setup elastic search
run: |
curl 'localhost:9200'
curl -XPUT 'localhost:9200/test?pretty' -H 'Content-Type: application/json' -d @config/elastic_mapping.json
curl -XPUT 'localhost:9200/ida?pretty' -H 'Content-Type: application/json' -d @config/elastic_ida_mapping.json
- name: 🔧 - Install Dependencies
run: |
pip install -r requirements.txt
pip install -r dev_requirements.txt
pip install tblib
pip freeze
- name: 🧪 - Testing
run: |
export BROWSER_TEST=chrome
coverage run --source='.' manage.py test
- name: 🧥‍ - Coveralls
continue-on-error: true
run: |
export COVERALLS_REPO_TOKEN=0NCZQkRT7k27xoKabeCH3UzAEUIDk5BAw
coveralls
- name: 📮 - Slack Notification
uses: rtCamp/action-slack-notify@v2
continue-on-error: true
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
env:
SLACK_COLOR: "${{ job.status == 'success' && 'good' || 'danger' }}"
SLACK_USERNAME: "Github Actions API"
SLACK_ICON_EMOJI: ":octocat:"
SLACK_TITLE: "CI API results in GitHub Actions"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: "#interpro7"
MSG_MINIMAL: Actions URL
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

[![Build Status](https://travis-ci.org/ProteinsWebTeam/interpro7-api.svg?branch=master)](https://travis-ci.org/ProteinsWebTeam/interpro7-api)
[![Unit and Funtional Testing](https://github.com/ProteinsWebTeam/interpro7-api/workflows/Unit%20and%20Funtional%20Testing/badge.svg)](https://github.com/ProteinsWebTeam/interpro7-api/actions?query=workflow%3A%22Unit+and+Funtional+Testing%22)
[![Coverage Status](https://coveralls.io/repos/github/ProteinsWebTeam/interpro7-api/badge.svg?branch=master)](https://coveralls.io/github/ProteinsWebTeam/interpro7-api?branch=master)
[![GitHub license](https://img.shields.io/badge/license-apache-blue.svg)](https://github.com/ProteinsWebTeam/interpro7-api/blob/master/LICENSE)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
Expand Down

0 comments on commit db72fc7

Please sign in to comment.