diff --git a/.github/workflows/build-config.yml b/.github/workflows/build.yml similarity index 95% rename from .github/workflows/build-config.yml rename to .github/workflows/build.yml index 4996b4cc..1a4e36e3 100644 --- a/.github/workflows/build-config.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,6 @@ on: push: branches: [ "main" ] pull_request: - branches: [ "main" ] jobs: build: @@ -54,6 +53,11 @@ jobs: test_commands: | test -c baseball-card-local.json --snapshot snapshots + - example: oil-gas + path: oil-gas-agent-automation + test_commands: | + test -c package-local.json + env: TZ: 'America/Los_Angeles' SQRL_VERSION: 'v0.5.10' diff --git a/.gitignore b/.gitignore index 8a0a91e2..88365cd9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ target h2.db.mv.db cache +.project # Created by https://www.toptal.com/developers/gitignore/api/python diff --git a/oil-gas-agent-automation/operations-agent.sqrl b/oil-gas-agent-automation/operations-agent.sqrl index 03996703..6fa582a1 100644 --- a/oil-gas-agent-automation/operations-agent.sqrl +++ b/oil-gas-agent-automation/operations-agent.sqrl @@ -27,3 +27,6 @@ RecentPressure := SELECT assetId, endOfSecond(timestamp, 10) AS timestamp_normal FROM Measurement GROUP BY assetId, timestamp_normalized ORDER BY timestamp_normalized DESC; +/*+ test */ +RecentPressureTest := SELECT * FROM RecentPressure ORDER BY timestamp_normalized DESC; + diff --git a/oil-gas-agent-automation/snapshots/RecentPressureTest.snapshot b/oil-gas-agent-automation/snapshots/RecentPressureTest.snapshot new file mode 100644 index 00000000..ccc33ee5 --- /dev/null +++ b/oil-gas-agent-automation/snapshots/RecentPressureTest.snapshot @@ -0,0 +1 @@ +{"data":{"RecentPressureTest":[{"assetId":12221.0,"timestamp_normalized":"2025-02-11T12:21:29.999Z","pressure_psi":3399.59,"temperature_f":189.68},{"assetId":21112.0,"timestamp_normalized":"2025-02-11T12:21:29.999Z","pressure_psi":1803.95,"temperature_f":189.51},{"assetId":34443.0,"timestamp_normalized":"2025-02-11T12:21:29.999Z","pressure_psi":3686.41,"temperature_f":190.04},{"assetId":45555.0,"timestamp_normalized":"2025-02-11T12:21:29.999Z","pressure_psi":2076.75,"temperature_f":189.98},{"assetId":59995.0,"timestamp_normalized":"2025-02-11T12:21:29.999Z","pressure_psi":2999.76,"temperature_f":189.9},{"assetId":12221.0,"timestamp_normalized":"2025-02-11T12:21:19.999Z","pressure_psi":3397.36,"temperature_f":189.41},{"assetId":21112.0,"timestamp_normalized":"2025-02-11T12:21:19.999Z","pressure_psi":1808.38,"temperature_f":190.25},{"assetId":34443.0,"timestamp_normalized":"2025-02-11T12:21:19.999Z","pressure_psi":3603.5,"temperature_f":190.15},{"assetId":45555.0,"timestamp_normalized":"2025-02-11T12:21:19.999Z","pressure_psi":2127.65,"temperature_f":189.54},{"assetId":59995.0,"timestamp_normalized":"2025-02-11T12:21:19.999Z","pressure_psi":3000.97,"temperature_f":190.4}]}} \ No newline at end of file