-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (56 loc) · 2.08 KB
/
ci.yml
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
58
59
60
61
name: CI Checks
on: [pull_request]
jobs:
check-commit-message:
name: Check Commit Message
runs-on: ubuntu-latest
steps:
- name: Check JIRA ID
uses: gsactions/commit-message-checker@v1
with:
pattern: '\[?[A-Z]{1,5}-[1-9][0-9]*.+$'
flags: 'gm'
excludeDescription: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.PAT_ACTIONS }}
error: 'One of your your commit messages is not matching the format with JIRA ID Ex: ( SDK-123 commit message )'
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: create-json
id: create-json
uses: jsdaniell/[email protected]
with:
name: "credentials.json"
json: ${{ secrets.CREDENTIALS_FILE_STR }}
- name: 'Setup .env'
run: |
touch .env
echo VAULT_ID=${{secrets.VAULT_ID}} >> .env
echo VAULT_URL=${{secrets.VAULT_URL}} >> .env
echo DETOKENIZE_TEST_TOKEN=${{secrets.DETOKENIZE_TEST_TOKEN}} >> .env
echo DETOKENIZE_TEST_VALUE=${{secrets.DETOKENIZE_TEST_VALUE}} >> .env
echo CREDENTIALS_FILE_PATH=./credentials.json >> .env
echo CVV_GEN_CONNECTION_URL=${{secrets.CVV_GEN_CONNECTION_URL}} >> .env
echo VISA_CONNECTION_BASIC_AUTH=${{secrets.VISA_CONNECTION_BASIC_AUTH}} >> .env
echo SKYFLOW_ID1=${{secrets.SKYFLOW_ID1}} >> .env
echo SKYFLOW_ID2=${{secrets.SKYFLOW_ID2}} >> .env
echo SKYFLOW_ID3=${{secrets.SKYFLOW_ID3}} >> .env
- name: 'Run Tests'
run: |
python -m pip install --upgrade pip
pip install requests pyjwt datetime aiohttp cryptography python-dotenv coverage
coverage run --source skyflow -m unittest discover
- name: coverage
run: coverage xml -o test-coverage.xml
- name: Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_REPO_UPLOAD_TOKEN }}
files: test-coverage.xml
name: codecov-skyflow-python
verbose: true