Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
Signed-off-by: SkandaBT <[email protected]>
  • Loading branch information
skanda890 authored Aug 8, 2024
1 parent 3a650e9 commit 1b638f8
Showing 1 changed file with 17 additions and 64 deletions.
81 changes: 17 additions & 64 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,77 +1,30 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
unit-test:
name: Run unit tests
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
- name: Checkout
uses: actions/checkout@v4
with:
node-version: '14'

- name: Install dependencies
run: npm install

- name: Run tests
run: npm run test:ci

- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: test-results
path: ./test-results.xml

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python 3.10
uses: actions/setup-python@v2
fetch-depth: 0
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: '3.10'

python-version: 3.11
- name: Install dependencies
run: |
pip install --upgrade pip
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint and test
- name: Test with pytest
run: |
pytest --cov app
pytest --cov --junitxml=junit.xml
# Copy and paste the codecov/test-results-action here
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: '12'

- name: Setup Java JDK
uses: actions/setup-java@v2
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
java-version: '11'
distribution: 'adopt'
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 1b638f8

Please sign in to comment.