Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Binary file added .DS_Store
Binary file not shown.
Binary file added .github/.DS_Store
Binary file not shown.
61 changes: 57 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,73 @@ on:

jobs:
build-and-publish:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
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
with:
password: ${{ secrets.pypi_password }}
skip_existing: true
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
43 changes: 43 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Pytest Workflow

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

jobs:
coverage-report:
strategy:
matrix:
python-version:
- 3.9
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
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
with:
parallel-finished: true
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,13 @@ dmypy.json

# Pyre type checker
.pyre/
tests/config/default.yml
.talismanrc
.vscode/settings.json
run.py
tests/resources/.DS_Store
.talismanrc
tests/.DS_Store
tests/resources/.DS_Store
.DS_Store
.talismanrc
52 changes: 51 additions & 1 deletion .talismanrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
fileignoreconfig:

- filename: tests/config/default.yml.enc
checksum: f05423216fcfe17716c01932e7a87775a029ec4f1fb1314bfdf0697527e67038
- filename: tests/test_contentstack.py
checksum: 4aae839b0c4e408c6224df5ccdd090ea9d9b28cc9f37e1eadd2d7737bd5ca1ae
- filename: contentstack_management/users/user.py
checksum: 9fd02cdc5e1cd22cf3fcd9b3f2159a3e7680d19052c58ab7425bfca4bd675a4f
checksum: a3e98d980282254e26b9fc1073bf297ea6fda3e30e3634d5c7df893cfcc92aa2
- filename: contentstack_management/stack/stack.py
checksum: 704f1cffd452d226e7447213fcb6a3fed7b01f0661aa27d4f7657b8a36eb3d28
- filename: contentstack_management/core/client.py
checksum: 7a1210ec269e05af414e7753758d8b261c157349e24df4fef047810fef8741c9
- filename: tests/test_organizations.py
checksum: a9ee8e15a00474ab16920da1a9cb7f96f9a0e40f945406506ed1e46030758025
- filename: tests/test_users.py
Expand All @@ -11,4 +20,45 @@ fileignoreconfig:
checksum: d2ea9ae192ae0f1b75ff2b68b6bcd9d40eb86d589fb2177535b93194d69a9e0e
- filename: tests/test_user_session.py
checksum: f5000644a471e6ac4ee5bfcb5cfc73762e53fa97980951063f787a83e97244f9
version: ""

fileignoreconfig:
- filename: tests/test_users.py
checksum: 7c278a3b24fdcf01a30561326fbdadf45dffd52edcbbe421d192c360dc4be1e1
- filename: contentstack_management/stack/stack.py
checksum: 480b855afcc96875ce49f4da6cb433e0ba10183e1b73297c2d1c66565602ff0b
version: ""

fileignoreconfig:
- filename: contentstack_management/core/client.py
checksum: 253a6e6a0234745cd5d194f6023d207acfb0259a8751d77c67fb8275a723d551
- filename: contentstack_management/user_session/user_session.py
checksum: 8f8353a3f658cd894fce7bee1d0211a612b18a639d1f8006548e89a5f5e32a17
version: ""
fileignoreconfig:
- filename: contentstack_management/users/user.py
checksum: 9944801292f054e6ffcc56b6e1eea2c401776147970dc137de33ad9b63992c36
- filename: tests/stack/test_stack_apitest.py
checksum: 9c9bc43b0aed1f94c27616ca198e3ec0cdc9e6680d9148f8ac7d507fad6d0d19
- filename: contentstack_management/core/client.py
checksum: c584f6982526755542afdb51dec421dd823073405827e32e6f229ff1c4cfa87e
- filename: contentstack_management/organizations/organizations.py
checksum: aea751acdfad7ebf07036d78f792abdf5339c9d02fb9d9f7540fcfe9f1d224f5
- filename: tests/stack/test_stack_unittest.py
checksum: a2ba35250e069e789f11e40efa7c1b2786f5db6899497643b5bf3a0e344d13e9
- filename: contentstack_management/stack/stack.py
checksum: f1b63294922e19f41dbf30caa6cbefe381b0c8834950d94dad7c7a28dd707047
version: ""

fileignoreconfig:
- filename: contentstack_management/organizations/organizations.py
checksum: 31dc00bc449f8a9e5cb9321da10384dd7d40bd8fce30e56699e0ce0a0e3de48e
- filename: contentstack_management/users/user.py
checksum: 1aa5ed251d166293e2616c6a227ee945a8213c5fde03778db08abac5f1a09c72
- filename: tests/stack/test_stack_unittest.py
checksum: 12389c99db0d917954cd9970b340cc443602b4acf512090f42d13f7a726c85b6
version: ""
fileignoreconfig:
- filename: contentstack_management/global_fields/global_fields.py
checksum: 53742c03c5c459a195b99b613a1df2dde7b9a61f6c4839b51be3f54dec56dd21
version: ""
Loading