Skip to content

Commit

Permalink
feat(testing): github action
Browse files Browse the repository at this point in the history
  • Loading branch information
sg-s committed Apr 11, 2024
1 parent 7a1b758 commit c34a7a7
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Pre merge checks

on:
pull_request:
branches: [ main ]


jobs:
inital_checks:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4


- name: Check code formatting using ruff
uses: chartboost/ruff-action@v1
with:
version: 0.3.1
args: format --check

- name: Check import order
uses: chartboost/ruff-action@v1
with:
version: 0.3.1
args: check --select I


standard_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

needs: [inital_checks]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- run: 'mkdir /home/runner/.deep-origin/'
shell: bash

- run: 'cp tests/config.yml /home/runner/.deep-origin/config.yml'
shell: bash



- name: run tests
run: |
pip install --upgrade pip
pip install --upgrade setuptools
pip install -e .[test]
make test

64 changes: 64 additions & 0 deletions tests/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
organization_id: rainy-goat-rhs
bench_id: respective-eagle-ray
nucleus_api_endpoint: https://deeporigin.mock/
auth_domain: https://deeporigin.mock
auth_device_code_endpoint: /oauth/device/code
auth_token_endpoint: /oauth/token
auth_audience: https://os.deeporigin.io/api
auth_grant_type: urn:ietf:params:oauth:grant-type:device_code
auth_client_id: secret
auth_client_secret: secret
list_bench_variables_query_template: |
query {
listBenchSecrets(drn: "${bench_drn}") {
... on EnvironmentValueOutput {
drn
type
name
key
value
}
... on ConfigurationValueOutput {
drn
type
name
filename
value
}
... on AwsSecretOutput {
drn
type
name
profileName
accessKey
secretKey
defaultRegion
}
... on GitSecretOutput {
drn
type
name
repository
username
password
}
... on GPGSecretOutput {
drn
type
name
value
}
... on SshSecretOutput {
drn
type
name
filename
value
}
}
}
api_tokens_filename: ~/.deep-origin/api_tokens
variables_cache_filename: ~/.deep-origin/variables.yml
auto_install_variables_filename: ~/.deep-origin/auto-install-variables.sh
feature_flags: null
env: local

0 comments on commit c34a7a7

Please sign in to comment.