From bd83a3a8947a273f134ac8dcc005aa23b9250df1 Mon Sep 17 00:00:00 2001 From: xendit-devx-bot Date: Thu, 15 Aug 2024 05:47:06 +0000 Subject: [PATCH] Generated Xendit python SDK --- .github/workflows/generate-release-tag.yml | 95 +++++++++++----------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/.github/workflows/generate-release-tag.yml b/.github/workflows/generate-release-tag.yml index 9813a8f..df9a5ca 100644 --- a/.github/workflows/generate-release-tag.yml +++ b/.github/workflows/generate-release-tag.yml @@ -4,56 +4,57 @@ on: types: [create-release-tag] jobs: - # testing: - # runs-on: ubuntu-latest - # strategy: - # matrix: - # python-version: ["3.10","3.11","3.12"] - # steps: - # - uses: actions/checkout@v3 - - # - name: Set up Python ${{ matrix.python-version }} - # uses: actions/setup-python@v4 - # with: - # python-version: ${{ matrix.python-version }} - # cache: 'pip' - - # - name: Print python version - # run: python --version - - # - name: Install dependencies - # run: pip install -r requirements.txt - - # - name: Run test - # run: DEVELOPMENT_API_KEY=${{ secrets.DEVELOPMENT_API_KEY }} pytest -s --log-cli-level=DEBUG - - # send-test-result: - # name: Slack Notification - # needs: [testing] - # if: always() && (needs.testing.result == 'success' || needs.testing.result == 'failure') - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - - # - name: Set Slack Color - # id: set_color - # run: | - # if [ "${{ needs.testing.result }}" == "success" ]; then - # echo "color=good" >> $GITHUB_ENV - # else - # echo "color=danger" >> $GITHUB_ENV - # fi - - # - name: Send Slack Notification - # uses: rtCamp/action-slack-notify@v2 - # env: - # SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - # SLACK_TITLE: "[xendi-python] CI pipeline for ${{ github.event.client_payload.version }}" - # SLACK_MESSAGE: 'Test Result: ${{ needs.testing.result }}' - # SLACK_COLOR: ${{ steps.set_color.outputs.color }} + testing: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10","3.11","3.12"] + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + + - name: Print python version + run: python --version + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Run test + run: DEVELOPMENT_API_KEY=${{ secrets.DEVELOPMENT_API_KEY }} pytest -s --log-cli-level=DEBUG + + send-test-result: + name: Slack Notification + needs: [testing] + if: always() && (needs.testing.result == 'success' || needs.testing.result == 'failure') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set Slack Color + id: set_color + run: | + if [ "${{ needs.testing.result }}" == "success" ]; then + echo "color=good" >> $GITHUB_ENV + else + echo "color=danger" >> $GITHUB_ENV + fi + + - name: Send Slack Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_TITLE: "[xendi-python] CI pipeline for ${{ github.event.client_payload.version }}" + SLACK_MESSAGE: 'Test Result: ${{ needs.testing.result }}' + SLACK_COLOR: ${{ steps.set_color.outputs.color }} publish-release-tag: runs-on: ubuntu-latest + needs: [testing] steps: - uses: actions/checkout@v3