forked from Kashika08/application-tracking-system
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: dockerfiles * feat: revamped ci * feat: revamped ci * 🚿 * 🚿 * 🚿 * 🚿 * 🚿 * 🚿 * 🚿
- Loading branch information
Showing
13 changed files
with
175 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Check if frontend can be built | ||
|
||
on: | ||
push: | ||
branches: [project2] | ||
pull_request: | ||
branches: [project2] | ||
|
||
jobs: | ||
frontend: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
working-directory: frontend/ | ||
|
||
- name: Build | ||
run: npm run build | ||
working-directory: frontend/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Check Prettier formatting | ||
|
||
on: | ||
push: | ||
branches: [project2] | ||
pull_request: | ||
branches: [project2] | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 # Updated to the latest version | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' # Specify the version of Node.js you need | ||
|
||
- name: Install Prettier | ||
run: npm install --global prettier # Install Prettier globally | ||
|
||
- name: Run Prettier | ||
run: | | ||
prettier --check src/**/*.{js,ts,tsx,css} | ||
prettier --check ../backend | ||
working-directory: frontend/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,33 @@ | ||
name: Pylint | ||
|
||
on: [push] | ||
on: | ||
push: | ||
branches: [project2] | ||
pull_request: | ||
branches: [project2] | ||
|
||
jobs: | ||
build: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pylint | ||
- name: Analysing the code with pylint | ||
run: | | ||
pylint $(git ls-files '*.py') | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.13 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.13 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pylint | ||
- name: Analyzing the code with pylint | ||
run: | | ||
pylint $(git ls-files '*.py') > pylint_output.txt || true | ||
score=$(tail -n 1 pylint_output.txt | awk '{print $2}') # Get the Pylint score | ||
echo "::set-output name=score::$score" # Set the score as output | ||
- name: Save Pylint score to file | ||
run: | | ||
echo "Pylint Score: ${{ steps.pylint.outputs.score }}" > pylint_score.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Pytest CI | ||
|
||
on: | ||
push: | ||
branches: [project2] | ||
pull_request: | ||
branches: [project2] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
services: | ||
mongodb: | ||
image: mongo:5.0 | ||
ports: | ||
- 27017:27017 | ||
env: | ||
MONGO_INITDB_DATABASE: mydatabase | ||
options: >- | ||
--health-cmd "mongo --eval 'db.runCommand({ ping: 1 })'" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.13 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.13 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pytest pytest-cov pytest-mock coverage | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
pip install -r ./backend/requirements.txt | ||
- name: Set environment variable for MongoDB | ||
run: echo "MONGODB_HOST_STRING=mongodb://localhost:27017/mydatabase" >> $GITHUB_ENV | ||
|
||
- name: Test with pytest | ||
run: | | ||
cd ./backend | ||
pwd | ||
pytest --cov-report xml:cov.xml --cov=./ ./ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.