Skip to content

Switch sync proxy adapter to use requests package #115

Switch sync proxy adapter to use requests package

Switch sync proxy adapter to use requests package #115

name: Test odin-control
on:
- push
- pull_request
jobs:
build_and_test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions coverage
- name: Test with tox
run: tox
- name: Merge tox env specific coverage files
run: |
coverage combine
if [[ "${{ matrix.python-version }}" == 2.7* ]]; then
export COVERAGE_RC=.coveragerc-py27
else
export COVERAGE_RC=.coveragerc
fi
coverage xml --rcfile=$COVERAGE_RC
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
name: ${{ matrix.python-version }}
fail_ci_if_error: false
notify:
if: ${{ always() }}
runs-on: ubuntu-latest
needs: build_and_test
steps:
- name: Slack Notification on completion
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: odin-control-notify
SLACK_COLOR: ${{ needs.build_and_test.result }}
SLACK_ICON: https://avatars.githubusercontent.com/odin-detector?size=48
SLACK_TITLE: "odin-control CI tests completed: ${{ needs.build_and_test.result }}"
SLACK_USERNAME: odin-detector
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}