From bef08eb4e7559c1e15fcb21fb000c0153fc24106 Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Thu, 15 Feb 2024 09:07:19 +0100 Subject: [PATCH 1/3] Move tests to actions --- .github/workflows/main.yaml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..6332016 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,37 @@ +name: Test IM + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Check out the codebase. + uses: actions/checkout@v4 + + - name: Set up Python 3. + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install dependencies + run: python -m pip install pycodestyle ply coverage + + - name: Check code style + run: pycodestyle --max-line-length=120 --ignore=E402,W504,W605,E722,E741 . --exclude=doc + + - name: Unit tests + run: python -m coverage run --source=. -m unittest discover -s test -p '*.py' + + - name: Generate XML coverage report + run: python -m coverage xml + + - name: Report coverage + uses: codacy/codacy-coverage-reporter-action@v1 + with: + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + coverage-reports: coverage.xml \ No newline at end of file From 8186f8f12d9117c0eabd647c7eff2a604b7745c2 Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Thu, 15 Feb 2024 09:09:58 +0100 Subject: [PATCH 2/3] Move tests to actions --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6332016..7c7509a 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,4 +1,4 @@ -name: Test IM +name: Test RADL on: push: From 4658ccae20a6989010168a6dae0cab402fbfbc26 Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Thu, 15 Feb 2024 09:13:13 +0100 Subject: [PATCH 3/3] Move tests to actions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a1cd477..c2d71ee 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Resource and Application Description Language (RADL) parser [![PyPI](https://img.shields.io/pypi/v/radl.svg)](https://pypi.org/project/radl) -[![Build Status](http://jenkins.i3m.upv.es/buildStatus/icon?job=grycap/radl-parser)](https://jenkins.i3m.upv.es/job/grycap/job/radl-parser/) +[![Tests](https://github.com/grycap/RADL/actions/workflows/main.yaml/badge.svg)](https://github.com/grycap/RADL/actions/workflows/main.yaml) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/9f9c0257b8b84a6daff76fbe09a9ce18)](https://www.codacy.com/app/micafer/radl) [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/9f9c0257b8b84a6daff76fbe09a9ce18)](https://www.codacy.com/app/micafer/radl) [![License](https://img.shields.io/badge/license-GPL%20v3.0-brightgreen.svg)](LICENSE)