chore: update main.yml with correct ubuntu and python versions #15
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [ master, github-action-slack-notification ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| if: "!contains(toJSON(github.event.commits.*.message), '[skip-ci]')" | |
| name: Test on python ${{ matrix.python-version }} and ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-22.04 | |
| python-version: [ 3.7, 3.8, 3.9, 3.10, 3.11, 3.12 ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install packages | |
| run: | | |
| python -m pip install --upgrade pip | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| if [ -f requirements-ci.txt ]; then pip install -r requirements-ci.txt; fi | |
| - name: Run tests | |
| run: coverage run --source=vwo setup.py test | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| fail_ci_if_error: true | |
| - name: Notification | |
| if: always() | |
| id: slack | |
| uses: wingify/[email protected] | |
| with: | |
| channel-id: 'vwo-fs-fme-sdk-job-status' | |
| slack-message: "<!here> Test on *Python-${{ matrix.python-version }}* and *${{ matrix.os }}* got *${{job.status}}* ${{job.status == 'success' && ':heavy_check_mark:' || ':x:'}} \nCommit: `${{github.event.head_commit.message}}`. \nCheck the latest build: https://github.com/wingify/vwo-fme-python-sdk/actions" | |
| color: "${{job.status == 'success' && '#00FF00' || '#FF0000'}}" | |
| env: | |
| SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} |