Ee2 update codecov #1843
Workflow file for this run
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
# This workflow will install Python dependencies, run tests and lint | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Execution Engine 2 Test Suite | |
on: | |
[ pull_request ] | |
jobs: | |
Lint_with_Black: | |
runs-on: ubuntu-latest | |
name: Lint With Black | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: psf/black@stable | |
with: | |
options: "--check --verbose" | |
src: "./lib" | |
version: "22.10.0" | |
- uses: psf/black@stable | |
with: | |
options: "--check --verbose" | |
src: "./test" | |
version: "22.10.0" | |
Lint_with_Flake8: | |
runs-on: ubuntu-latest | |
name: Lint With Flake8 | |
steps: | |
- name: Check out source repository | |
uses: actions/checkout@v4 | |
- name: Set up Python environment | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10.14" | |
- name: flake8 Lint Lib | |
uses: py-actions/flake8@v2 | |
with: | |
path: "./lib" | |
- name: flake8 Lint Test | |
uses: py-actions/flake8@v2 | |
with: | |
path: "./test" | |
Build_and_Run_Tests_and_CodeCov: | |
name: Build and Run Tests and CodeCov | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
mongo-version: ["7.0", "3.6"] | |
services: | |
mongo: | |
image: mongo:${{ matrix.mongo-version }} | |
options: > | |
--health-cmd "mongosh --eval 'db.adminCommand(\"ping\")'" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 3 | |
ports: | |
- 27017:27017 | |
env: | |
MONGO_INITDB_DATABASE: travis | |
MONGO_INITDB_ROOT_USERNAME: travis | |
MONGO_INITDB_ROOT_PASSWORD: travis | |
steps: | |
- name: Check out source repository | |
uses: actions/checkout@v4 | |
- name: Set up Python environment | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10.14" | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
git clone https://github.com/kbase/jars /opt/jars | |
- name: Run Tests with Coverage | |
env: | |
MONGO_URL: mongodb://root:example@localhost:27017/testdb | |
run: | | |
cp test/env/test.travis.env test.env | |
make test-coverage | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Cleanup | |
run: | | |
docker-compose down |