-
Notifications
You must be signed in to change notification settings - Fork 122
57 lines (56 loc) · 2.06 KB
/
aws-coverage.yml
File metadata and controls
57 lines (56 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This workflow will run an aws backend test.
name: AWS coverage
on:
push:
branches: [ "add-code-coverage" ]
paths:
- 'lithops/serverless/**'
- '!lithops/serverless/backends/k8s/**'
- '.github/workflows/aws-coverage.yml'
pull_request:
branches: [ "add-code-coverage" ]
paths:
- 'lithops/serverless/**'
- '!lithops/serverless/backends/k8s/**'
- '.github/workflows/aws-coverage.yml'
jobs:
build_aws:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
python -m pip install pytest-cov
- name: Install lithops
run: |
pip install .
- name: Test aws with pytest
run: |
echo "lithops:" > .lithops_config
echo " backend: aws_lambda" >> .lithops_config
echo " storage: aws_s3" >> .lithops_config
echo "aws:" >> .lithops_config
echo " region: us-east-1" >> .lithops_config
echo " access_key_id: ${{ secrets.AWS_KEY_ID }}" >> .lithops_config
echo " secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> .lithops_config
echo "aws_lambda:" >> .lithops_config
echo " execution_role: ${{ secrets.AWS_ROLE }}" >> .lithops_config
coverage run --omit=./lithops/standalone/*,./lithops/util/*,./lithops/libs/*,./lithops/localhost/*,./lithops/utils.py,./lithops/tests/util_func/*,./lithops/scripts/**,./lithops/tests/test_template.py,./lithops/tests/tests_main.py -m pytest ./lithops/tests/github_coverage.py -k aws
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
slug: acanadil/lithops
flags: aws