Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix badge for workflow in readme.md #108

Merged
merged 16 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/ci-linter-backend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: UGent-3-backend-linter
run-name: ${{ github.actor }} is running backend linter 🚀
on: [pull_request]
jobs:
Backend-tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip'

- name: Run linting
working-directory: ./backend
run: find . -type f -name "*.py" | xargs pylint

27 changes: 27 additions & 0 deletions .github/workflows/ci-linter-frontend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: UGent-3-frontend-linter
run-name: ${{ github.actor }} is running frontend linter 🚀
on: [pull_request]
jobs:
Frontend-tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-

- name: Install dependencies
working-directory: ./frontend
run: npm i eslint

- name: Run linting
working-directory: ./frontend
run: npm run lint

24 changes: 24 additions & 0 deletions .github/workflows/ci-test-backend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: UGent-3-backend-test
run-name: ${{ github.actor }} is running backend tests 🚀
on: [pull_request]
jobs:
Backend-tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip'

- name: Install dependencies
working-directory: ./backend
run: pip3 install -r requirements.txt && pip3 install -r dev-requirements.txt

- name: Running tests
working-directory: ./backend
run: bash ./run_tests.sh


35 changes: 35 additions & 0 deletions .github/workflows/ci-test-frontend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: UGent-3-frontend-test
run-name: ${{ github.actor }} is running frontend tests 🚀
on: [pull_request]
jobs:
Frontend-tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-

- name: Install dependencies
working-directory: ./frontend
run: npm ci

- name: Build
working-directory: ./frontend
run: npm run build

- name: Preview Web App
working-directory: ./frontend
run: npm run preview &

- name: Running tests
working-directory: ./frontend
run: npm test

62 changes: 0 additions & 62 deletions .github/workflows/ci-tests.yml

This file was deleted.

2 changes: 2 additions & 0 deletions backend/README.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add the badges in front-end

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Project pigeonhole backend
![tests](https://github.com/SELab-2/UGent-3/actions/workflows/ci-test-backend.yaml/badge.svg)
![linter](https://github.com/SELab-2/UGent-3/actions/workflows/ci-linter-backend.yaml/badge.svg)
## Prerequisites
**1. Clone the repo**
```sh
Expand Down