Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f0a4389
feat: :sparkles: implemented branches and aliases with unit and api t…
harshithad0703 Jun 5, 2023
f603690
test: :white_check_mark: added mock tests for branches and aliases
harshithad0703 Jun 6, 2023
5dd5ce8
docs: :memo: added api documentation for branches and aliases
harshithad0703 Jun 8, 2023
08cfa1a
feat: :sparkles: content type implementation with api references, uni…
harshithad0703 Jun 15, 2023
89955ba
test: renamed the api, mock, unit test file names of branch and alias
harshithad0703 Jun 15, 2023
b7b9f16
test: renamed file path in branch and alias mock tests
harshithad0703 Jun 16, 2023
efb4c57
test: improved coverage report for branches and aliases
harshithad0703 Jun 16, 2023
6bb9875
test: Added mock test cases for content type
harshithad0703 Jun 19, 2023
c8930b2
docs: :memo: Cleared typo errors
harshithad0703 Jun 23, 2023
d6f4a80
Merge branch 'branches-and-aliases-implementation' into content-type-…
harshithad0703 Jun 23, 2023
5544e9d
test: removed unwanted test files
harshithad0703 Jun 23, 2023
2a58514
refactor: Code improvement for branches, aliases and content type imp…
harshithad0703 Jul 7, 2023
e6fc851
Merge branch 'next' into feat/CS-39240-content-type-implementation
sunil-lakshman Jul 7, 2023
21a591a
- General code improvements
ishaileshmishra Jul 7, 2023
fc73c06
- General code improvements
ishaileshmishra Jul 7, 2023
77276fe
- General code improvements
ishaileshmishra Jul 12, 2023
3be7f9b
code enhancement
ishaileshmishra Jul 14, 2023
dba10cc
Created Entry class and test cases
sunil-lakshman Jul 17, 2023
b5d58d6
feat: :sparkles: asset class implementation with tests and api docs
harshithad0703 Jul 19, 2023
34e0420
Code improvements and changed test cases to new structure
sunil-lakshman Jul 19, 2023
7b2650b
test: :white_check_mark: added resources and made some changes in api…
harshithad0703 Jul 19, 2023
5467d77
Updated Unit test cases.
sunil-lakshman Jul 25, 2023
1a91315
Webhook class Implementation
sunil-lakshman Jul 28, 2023
d4e2e32
Merge branch 'feat/cs-39943-asset-implementation' into feat/CS-40286-…
sunil-lakshman Jul 31, 2023
5d141dd
Created workflow class
sunil-lakshman Aug 8, 2023
1a89f44
Deleted secrets-scan.yml file
sunil-lakshman Aug 8, 2023
150167e
Updated variable name
sunil-lakshman Aug 8, 2023
dae66d7
Deleted sast-scan.yml file
sunil-lakshman Aug 9, 2023
92e2a31
Feat/cs 40545 metadata class implemetation (#15)
sunil-lakshman Aug 23, 2023
98e5e30
Developed environment class implementation (#19)
sunil-lakshman Sep 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file modified .DS_Store
Binary file not shown.
100 changes: 29 additions & 71 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,39 @@
# this file is *not* meant to cover or endorse the use of GitHub Actions, but rather to
# help make automated releases for this project
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

name: Release
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [created]
types: [published]

permissions:
contents: read

jobs:
build-and-publish:
runs-on: ubuntu-22.04
deploy:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v3
with:
python-version: "3.10.11"
- name: Install build dependencies
run: python -m pip install -U setuptools wheel build
- name: Build
run: python -m build .
- name: Publish
uses: pypa/gh-action-pypi-publish@master
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
password: ${{ secrets.pypi_test_password }}
skip_existing: true

generate_and_upload_coverage:
name: Generate and Upload Coverage Report
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ["3.10.11"]

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

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Update Pip
run: pip install --upgrade pip
pip install --use-pep517

- name: Create and activate virtual environment
run: |
python -m venv venv
source venv/bin/activate

- name: Install build dependencies
run: python -m pip install -U setuptools wheel build

- name: Install dependencies
run: pip install -r requirements.txt

- name: Run tests and generate coverage report
run: |
coverage run -m pytest
coverage report -m > coverage.txt

- name: Archive coverage report
uses: actions/upload-artifact@v2
with:
name: coverage-report
path: coverage.txt

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.Test_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.Test_AWS_SECRET_ACCESS_KEY }}
aws-region: <your_aws_region> # Replace with your actual AWS region

- name: Upload coverage report to S3
run: aws s3 cp coverage.txt s3://<your_bucket_name>/coverage.txt
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
11 changes: 0 additions & 11 deletions .github/workflows/sast-scan.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/secrets-scan.yml

This file was deleted.

77 changes: 41 additions & 36 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,48 @@
name: Pytest Workflow
name: Coverage Report

on:
push:
branches:
- main
pull_request:
branches:
- main
on: [push] # You can adjust the trigger events as needed

jobs:
coverage-report:
strategy:
matrix:
python-version:
- 3.9
coverage:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install build dependencies
run: pip install --upgrade setuptools
- name: Install dot env
run: pip install python-dotenv
- name: Install requests
run: pip install requests
- uses: lpenz/ghaction-pytest-cov@v1
- uses: AndreMiras/coveralls-python-action@v20201129
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
parallel: true
flag-name: python-${{ matrix.python-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}


coverage-finish:
needs: coverage-report
runs-on: ubuntu-latest
steps:
- uses: AndreMiras/coveralls-python-action@v20201129
python-version: 3.11 # Choose the appropriate Python version

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt # If you have a requirements file
pip install coverage
pip install pytest
pip install coverage-badge


- name: Run tests and coverage
run: |
coverage run -m pytest tests/unit/
coverage report --include="tests/unit/*" -m > coverage_report.txt
coverage xml --include="tests/unit/*" -o coverage.xml
coverage html --include="tests/unit/*"
coverage-badge -o coverage.svg

- name: Upload coverage artifact
uses: actions/upload-artifact@v2
with:
parallel-finished: true
name: coverage-report
path: |
coverage_report.txt
coverage.xml
htmlcov
coverage.svg
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ dmypy.json
# Pyre type checker
.pyre/
tests/config/default.yml

.talismanrc
.vscode/settings.json
run.py
Expand All @@ -136,4 +137,4 @@ tests/resources/.DS_Store
tests/.DS_Store
tests/resources/.DS_Store
.DS_Store
.talismanrc
.talismanrc
15 changes: 15 additions & 0 deletions .idea/contentstack-management-python.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading