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 9, 2024
1 parent 1f8a365 commit cc55025
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,81 @@ jobs:
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

build:
runs-on: ubuntu-latest

env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

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

- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
- name: Lint and test
run: |
pytest --cov app
- name: Upload coverage to Codecov
if: success()
uses: codecov/codecov-action@v2
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
with:
java-version: '11'
distribution: 'adopt'

- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache npm
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
notifications:
email:
recipients:
- [email protected]
on_success: always
on_failure: always

- name: Setup Go environment
uses: actions/[email protected]
with:
# The Go version to download (if necessary) and use. Supports semver spec and ranges. Could you be sure to enclose this option in single quotation marks?
go-version: # optional
# Path to the go.mod or go.work file.
go-version-file: # optional
# Set this option to true if you want the action to always check for the latest available version that satisfies the version spec
check-latest: # optional
# Used to pull Go distributions from go-versions. Since there's a default, the user typically does not supply this. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
token: # optional, default is ${{ github.server_url == 'https://github.com' && github.token || '' }}
# Used to specify whether caching is needed. Set to true, if you'd like to enable caching.
cache: # optional, default is true
# Used to specify the path to a dependency file - go.sum
cache-dependency-path: # optional
# Target architecture for Go to use. Examples: x86, x64. Will use system architecture by default.
architecture: # optional

0 comments on commit cc55025

Please sign in to comment.