-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema_test.yml
More file actions
53 lines (52 loc) · 1.91 KB
/
Copy pathschema_test.yml
File metadata and controls
53 lines (52 loc) · 1.91 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
description: >
This command test schema on a database.
parameters:
dev_url:
type: string
default: ''
description: |
The URL of the dev-database to use for analysis. For example: mysql://root:pass@localhost:3306/dev.
Read more about [dev-databases](https://atlasgo.io/concepts/dev-database).
url:
type: string
default: ''
description: |
The desired schema URL(s) to test. For Example: `file://schema.hcl`
run:
type: string
default: ''
description: |
Filter tests to run by regexp. For example, `^test_.*` will only run tests that start with `test_`. Default is to run all tests.
config:
type: string
default: ''
description: |
The path to the Atlas configuration file. By default, Atlas will look for a file named `atlas.hcl` in the current directory.
For example, `file://config/atlas.hcl`. Learn more about [Atlas configuration files](https://atlasgo.io/atlas-schema/projects).
vars:
type: string
default: ''
description: |
Stringify JSON object containing variables to be used inside the Atlas configuration file. For example: '{"var1": "value1", "var2": "value2"}'
working_directory:
type: string
default: "."
description: |
The working directory to run from. Defaults to project root.
env:
type: string
default: ''
description: |
The environment to use from the Atlas configuration file. For example, `dev`.
steps:
- run:
name: Test schema on a database
command: atlasaction --action schema/test
environment:
ATLAS_INPUT_WORKING_DIRECTORY: <<parameters.working_directory>>
ATLAS_INPUT_DEV_URL: <<parameters.dev_url>>
ATLAS_INPUT_RUN: <<parameters.run>>
ATLAS_INPUT_URL: <<parameters.url>>
ATLAS_INPUT_CONFIG: <<parameters.config>>
ATLAS_INPUT_ENV: <<parameters.env>>
ATLAS_INPUT_VARS: <<parameters.vars>>