Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merges #99
Closes #99
  • Loading branch information
sduenas committed Jan 17, 2021
2 parents b1e27b0 + 3598af1 commit 3b82d0a
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 55 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: build

on: [push, pull_request]

jobs:
tests:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]

name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15

- name: Install dependencies
run: |
pip install --upgrade setuptools==49.6.0
pip install --upgrade pip==18.1
pip install --upgrade wheel
pip install -r "requirements.txt"
pip install flake8 coveralls
gem install github-linguist
pip install bandit pylint execnet
wget https://github.com/fossology/fossology/releases/download/3.8.1/FOSSology-3.8.0-debian9stretch.tar.gz
tar -xzf FOSSology-3.8.0-debian9stretch.tar.gz
sudo apt-get update -y
sudo apt-get -y install ./packages/fossology-common_3.8.1-1_amd64.deb ./packages/fossology-nomos_3.8.1-1_amd64.deb
sudo apt-get install cloc
eval "$(gimme stable)"
- name: Install Graal
run: ./setup.py install

- name: Install requirements
run: |
mkdir exec
cd exec
go get -u github.com/boyter/scc/
cd $GITHUB_WORKSPACE/exec/
git clone https://github.com/nexB/scancode-toolkit.git
cd scancode-toolkit
git checkout -b test_scancli 96069fd84066c97549d54f66bd2fe8c7813c6b52
./scancode --help
cd $GITHUB_WORKSPACE/exec/
wget https://github.com/crossminer/crossJadolint/releases/download/Pre-releasev2/jadolint.jar
cd $GITHUB_WORKSPACE/
- name: Lint with flake8
run: flake8 . --exclude=exec,src

- name: Tests and Coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd tests
coverage run --source=graal run_tests.py
# --service=github is a workaround for bug
# https://github.com/coveralls-clients/coveralls-python/issues/251
coveralls --service=github
51 changes: 0 additions & 51 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,4 +1,4 @@
# Graal: a Generic Repository AnALyzer [![Build Status](https://travis-ci.org/chaoss/grimoirelab-graal.svg?branch=master)](https://travis-ci.org/chaoss/grimoirelab-graal) [![Coverage Status](https://coveralls.io/repos/github/chaoss/grimoirelab-graal/badge.svg?branch=master)](https://coveralls.io/github/chaoss/grimoirelab-graal?branch=master)
# Graal: a Generic Repository AnALyzer [![Build Status](https://github.com/chaoss/grimoirelab-graal/workflows/build/badge.svg)](https://github.com/chaoss/grimoirelab-graal/actions?query=workflow:build+branch:master+event:push) [![Coverage Status](https://coveralls.io/repos/github/chaoss/grimoirelab-graal/badge.svg?branch=master)](https://coveralls.io/github/chaoss/grimoirelab-graal?branch=master)

Graal leverages on the Git backend of [Perceval](https://github.com/chaoss/grimoirelab-perceval) and enhances it to set up ad-hoc
source code analysis. Thus, it fetches the commits from a Git repository and provides a mechanism to plug third party tools/libraries focused on source code analysis.
Expand Down
6 changes: 3 additions & 3 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
#

NOMOS_PATH = "/usr/share/fossology/nomos/agent/nomossa"
SCANCODE_PATH = "/home/travis/build/chaoss/grimoirelab-graal/exec/scancode-toolkit/scancode"
SCANCODE_CLI_PATH = "/home/travis/build/chaoss/grimoirelab-graal/exec/scancode-toolkit/etc/scripts/scancli.py"
JADOLINT_PATH = "/home/travis/build/chaoss/grimoirelab-graal/exec/jadolint.jar"
SCANCODE_PATH = "/home/runner/work/grimoirelab-graal/grimoirelab-graal/exec/scancode-toolkit/scancode"
SCANCODE_CLI_PATH = "/home/runner/work/grimoirelab-graal/grimoirelab-graal/exec/scancode-toolkit/etc/scripts/scancli.py"
JADOLINT_PATH = "//home/runner/work/grimoirelab-graal/grimoirelab-graal/exec/jadolint.jar"

0 comments on commit 3b82d0a

Please sign in to comment.