setting.init.example file #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: py-podcast-parser-ci | |
on: | |
push: | |
branches-ignore: | |
- "master" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
strategy: | |
matrix: | |
python-version: ["3.9"] | |
steps: | |
- name: Send GitHub Action trigger data to Slack workflow | |
id: slack | |
uses: voxmedia/github-action-slack-notify-build@v1 | |
with: | |
channel: cp-github | |
status: STARTED | |
color: good | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.CONTENT_PLATFORM_SLACK_GITHUB_TOKEN }} | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::827541288795:role/content-github-actions-nonprod | |
aws-region: us-east-1 | |
role-duration-seconds: 1200 | |
- name: Setting up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Installing Dependencies | |
run: | | |
pip install pip --upgrade | |
pip install tox-gh | |
pip install virtualenv | |
- name: Tox | |
run: | | |
cp settings.ini.example settings.ini | |
CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token --domain content-platform --domain-owner 827541288795 --query authorizationToken --output text) && pip config set global.extra-index-url https://aws:$CODEARTIFACT_AUTH_TOKEN@content-platform-827541288795.d.codeartifact.us-east-1.amazonaws.com/pypi/content-platform/simple/ | |
python -m tox --verbose | |
env: | |
CODEARTIFACT_AUTH_TOKEN: $CODEARTIFACT_AUTH_TOKEN | |