-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(ci): Build using Nix (Ubuntu & macOS) #20
Closed
Closed
Changes from all commits
Commits
Show all changes
365 commits
Select commit
Hold shift + click to select a range
53b3143
chore(version): v0.5.0 [skip ci]
a37f5d2
fix: trimming newline character from version string
ShubhranshuSanjeev 47b615e
ci: deleting postgres's docker image on every test
ritickMadaanJuspay cd0cb60
chore(version): v0.5.1 [skip ci]
48fc4ad
feat: Schema addition for Dimension values
PrasannaJuspay dd17746
fix: fixed random timeouts in internal http calls to CAC
ShubhranshuSanjeev c249efc
fix: failed build due to untracked schema.rs file changes
ShubhranshuSanjeev 7cda606
ci: added 20 minutes timeout on pipeline
ShubhranshuSanjeev b63c753
feat: Adding generic eval
4637fd9
added audit_log_uuid in response header for get_config api
sauraww a2fde06
feat: cac eval return update
a9c5b04
fix: eval param fix
a5f8757
chore(version): v0.6.0 [skip ci]
8e311c7
fix: patching overrides on default-config instead of merge
ritickMadaanJuspay 5c471b2
chore(version): v0.6.1 [skip ci]
f14f9de
Stabilize & Revert API
mahatoankitkumar df0adf0
ci(flake.nix): pin nodejs version to 18 in flake
knutties 6a5fe1f
feat: cors middleware attached
ritickMadaanJuspay 6e01ead
Stabilize & Revert API
mahatoankitkumar 47b20da
Diff API
mahatoankitkumar 5ca8766
feat: added dashboard auth middleware
Datron 150a7be
chore(version): v0.7.0 [skip ci]
3da23da
fix: ssh.bitbucket.juspay.net added to known hosts in docker bulid
ritickMadaanJuspay 1ac80c4
fix: add user struct in delete context API
Datron a9e50be
chore(version): v0.7.1 [skip ci]
1337d34
chore: database migration for dimensions table
ritickMadaanJuspay 585a15c
feat: server's keep-alive time and db connection pool max size made c…
ritickMadaanJuspay ee5e00c
chore(version): v0.8.0 [skip ci]
7b6ae82
fix: add migration for changing default_configs_keys
pratikmishra356 189c369
chore(version): v0.8.1 [skip ci]
71c7a25
feat: support to update experiment override_keys and variants
ShubhranshuSanjeev 7a60eea
test: added tests for experiment helper fnxs
ShubhranshuSanjeev 38bc0e9
test: added postman test for update override_keys api
ShubhranshuSanjeev 400f3f0
fix: validating override_keys for unique entries
ShubhranshuSanjeev 4422c83
refactor: resolved comments
ShubhranshuSanjeev dc2db17
chore(version): v0.9.0 [skip ci]
ef7a37d
fix: add all variants in manifest
pratikmishra356 eddd8a4
chore(version): v0.9.1 [skip ci]
be2ddd2
validation for input override key
mahatoankitkumar 3e9fd4a
removed override from move context api
sauraww 2c810f7
feat: - Dimension value schema validation on context-addition
PrasannaJuspay 6d09f90
chore(version): v0.10.0 [skip ci]
2fa26dd
refactor!: moved tables and types out of cac_v1 schema
ShubhranshuSanjeev df2edb6
feat: added middleware and FromRequest for tenant and app scope info
ShubhranshuSanjeev 44e9b47
feat: added multi-tenant support
ShubhranshuSanjeev 7c429a7
chore(version): v0.11.0 [skip ci]
ae8c9be
fixed priority in the move api
sauraww f524388
feat: multi-tenant support for client libraries
ShubhranshuSanjeev 3a604b0
fix: fixed failing health check (x-tenant header not set)
ShubhranshuSanjeev 1612123
chore(version): v0.12.0 [skip ci]
cb5a92f
fix: x-tenant header mandate removed for OPTIONS calls
ritickMadaanJuspay 9f18f58
chore(version): v0.12.1 [skip ci]
bbecd7b
fix: x-tenant header added for /config/resolve call in diff
ritickMadaanJuspay 900fbb8
fix: added external crate to cocogitto config
ritickMadaanJuspay 5aafc72
chore(version): v0.13.0 [skip ci]
507e08c
fix: make sure envs with defaults prevent failure
Datron eccf091
feat: integrate authorize middleware
Datron 01d94ae
chore(version): v0.14.0 [skip ci]
8ad81c3
fix: cac service to set last_modified header
mahatoankitkumar c7fae30
CAC Filter API
mahatoankitkumar ac5fe3c
fix: Removing acceptance of override_keys in experiment create/update
mahatoankitkumar 00137db
chore(version): v0.14.1 [skip ci]
345b4af
feat: added frontend crate,combined frontend and backend binaries ()
sauraww 3611ef3
feat: added format check in the JenkinsFile()
sauraww bb87c89
chore: move dependencies to workspaces
Datron da2a4e3
fix: failing build due to update of schema.rs file
ShubhranshuSanjeev 3afb567
chore(version): v0.15.0 [skip ci]
7730c41
fix: add different auth types for exp requests to CAC
Datron 9cac541
chore(version): v0.15.1 [skip ci]
c13b140
feat: update default keys
mahatoankitkumar c33b445
fix: fixed deployment ConfigNotFound failure
ShubhranshuSanjeev 3d037dc
chore(version): v0.16.0 [skip ci]
78a03e2
fix: sort json while context creation
pratikmishra356 ba87783
chore(version): v0.16.1 [skip ci]
892f29c
fix: allow ramp 0
Datron ce7e53e
chore(version): v0.16.2 [skip ci]
bec2f1b
fix: - Cac client library changes to consume backend api response
PrasannaJuspay 6a68f71
fix: fix json schema validation
mahatoankitkumar 8e7db1f
fix: array validation for in condition
pratikmishra356 e4d4ef8
chore(version): v0.16.3 [skip ci]
7e87921
feat: ui for cac and exp
ShubhranshuSanjeev 1f4bd77
feat: experiment UI
Datron d00db1c
feat: added experiment-list page
ShubhranshuSanjeev 24b4cbf
feat: dimensions
mahatoankitkumar 3a6036c
feat: override and context form
ShubhranshuSanjeev bf94e31
feat: working experiments page
Datron c8bcfcc
feat: added default config page
sauraww 27f1236
feat: added default config and override screen
sauraww 3ce29f0
feat: experiment UI
Datron ba2eb38
feat: working experiments page
Datron c697e4d
feat: testing create form
Datron 3843763
feat: added state changes in the form
sauraww b04d3f5
fix: dimensions page updates
mahatoankitkumar c651e4a
feat: working resolve page
Datron 6376194
feat: fixed theme + ui changes + form validation + context validation…
sauraww 588d15a
feat: experiment create form
ShubhranshuSanjeev 93a3abd
feat: fixed experiment suspense block , added generic button
sauraww 27fbb99
feat: working resolve page
Datron 83d0f03
feat: resolve page with unified UI
Datron 8b0d0a3
fix: resolve UI bugs
Datron 97f7f1b
feat: added validation inside default config form , formatted dates ,…
sauraww ba2d33b
fix: context parsing
Datron 41905a6
fix: fixed experiment list page feedback
ShubhranshuSanjeev adafb49
fix: frontend multi-tenancy support + config and dimension page
ShubhranshuSanjeev caa9739
fix: UI fixes for demo
Datron 4db1f16
chore: formatted frontend code
ShubhranshuSanjeev 0ee0618
refactor: fixed warnings, added redirection for home page and script …
sauraww 1d710f3
refactor: fixed warnings, added redirection for home page and script …
sauraww 6e9b329
fix: minor docs update
Datron 00c36a6
fix: cleanup code
Datron cad8e7f
fix: fixed ci-test to support multi-tenant setup
ShubhranshuSanjeev 3311c5e
fix: fixed tenant hydration bug
sauraww ec7aecc
chore: formatted code + cleanup
ShubhranshuSanjeev 5759a15
chore(version): v0.17.0 [skip ci]
55ac190
fix: fixed build failure due to rust-version
ShubhranshuSanjeev c937b68
fix: frontend build process
ShubhranshuSanjeev 06bcd1a
chore(version): v0.17.1 [skip ci]
8a5b1b1
refactor: using snake case for component fxn names
ShubhranshuSanjeev a297aca
fix: fixed dimension form edit flow + fixed table component CellForma…
ShubhranshuSanjeev dfd8abb
fix: refactored DefaultConfig component + fixed edit flow
ShubhranshuSanjeev 46ca970
fix: error resolving pages with internal call to server
ShubhranshuSanjeev cf9ab88
chore(version): v0.17.2 [skip ci]
5c0ebc3
fix: fixed host resolve issue for internal calls in SSR.
ShubhranshuSanjeev c0f69aa
chore(version): v0.17.3 [skip ci]
917aa73
fix: added partitions for 2025 and 2026 for audit table
ShubhranshuSanjeev cebd182
chore(version): v0.17.4 [skip ci]
8141696
fix: getting api hostname from env for frontend
ShubhranshuSanjeev 4bf9ac8
feat: added between in frontend
be4b637
chore(version): v0.18.0 [skip ci]
0ca6832
ci: added NY ECR registry push to Jenkins
ShubhranshuSanjeev 7d9c5fe
fix: added partitions for audit_log table in cac schema
ShubhranshuSanjeev 811bbae
ci: removing test tenant sqls after ci-test
ShubhranshuSanjeev c52344e
chore(version): v0.18.1 [skip ci]
1c678b9
fix: refactored experiment page and fixed experiment edit flow
ShubhranshuSanjeev e1ab466
feat: added authentication header for frontend apis
sauraww d407b5a
chore(version): v0.19.0 [skip ci]
adad811
feat: added bool, i64 and decimal in default config form
sauraww e528e10
docs: () added setup instruction
sauraww f0993c7
feat: client-integration-doc
pratikmishra356 e3a338d
docs: context aware config docs
Datron 2b54792
chore: experimentation docs first cut
ShubhranshuSanjeev 5a0f48a
docs: add intro doc and features
knutties eb1fba3
docs: add intro doc and features
knutties 28e0694
docs: add intro doc and features
knutties 7f21af5
chore: autodeploy to sbx
Datron ee2254f
fix: jenkinsfile now sends build alerts in channel
Datron 3d64762
fix: fixing error message for experiment create and bulk context api
ce58f47
ci: pushing cac image to NY sbx ECR
ShubhranshuSanjeev 975ecf7
chore(version): v0.20.0 [skip ci]
660c642
fix: better logging
Datron 9915af9
chore(version): v0.20.1 [skip ci]
19223be
feat: support for service prefix
ShubhranshuSanjeev 2ac33ed
chore(version): v0.21.0 [skip ci]
b018117
fix: using SERVICE_NAME in is_server instead of SERVER_NAME(wrong var…
ShubhranshuSanjeev f4e4a31
chore(version): v0.22.0 [skip ci]
3786b69
feat: js eval with node exec
pratikmishra356 267dc4a
chore(version): v0.23.0 [skip ci]
0bb238e
feat: CRUD APIs for function validator
mahatoankitkumar 06974f1
fix: Do not remove keys with null value on merge
ayushjain17 372c9de
chore(version): v0.24.0 [skip ci]
f039558
fix: fix copy of experiment ID
Datron f2a437b
chore(version): v0.24.1 [skip ci]
8ccb942
fix: returning error response if CAC call not 200
ShubhranshuSanjeev aa56d9b
chore(version): v0.24.2 [skip ci]
a270dee
fix: add traffic percentage to experiments table
Datron f3bfcc0
fix: transpose columns in single experiment page for variants
Datron fb5bb46
feat: autodeploy
Datron 6667206
chore(version): v0.25.0 [skip ci]
a5e50d6
fix: autodeploy
Datron 3910299
feat: added test,publish api for functions
pratikmishra356 e6d8ed2
chore(version): v0.26.0 [skip ci]
5b51c63
feat: add node to app directory
pratikmishra356 c678efe
chore(version): v0.27.0 [skip ci]
032dc3a
feat: Replace merge-strategy option for resolve/eval
ayushjain17 75396e5
chore(version): v0.28.0 [skip ci]
6553e30
feat: url click and text wrap fixes
SauravCVJuspay 50c8a96
fix: added drawer, improved UX & single click override addition to va…
ShubhranshuSanjeev fa09a96
fix: added frontend crate to cog.toml
ShubhranshuSanjeev 53a20b5
chore(version): v0.29.0 [skip ci]
096d683
feat: added CAC language support
Datron 2c3d0dc
feat: support more operations
Datron 038c898
chore(version): v0.30.0 [skip ci]
6f70186
fix: adding min-width settings for table component
Datron fd38192
chore(version): v0.30.1 [skip ci]
b3ad959
feat: Added function validation for context and default_config
mahatoankitkumar c602b93
chore(version): v0.31.0 [skip ci]
39bd090
docs: add intro doc and features
knutties 0ce569b
feat: haskell client for superposition
Datron 7067b36
fix: moved to AWS Public ECR for docker images
ShubhranshuSanjeev 6897659
fix: update cargo.lock
Datron ae88083
chore(version): v0.32.0 [skip ci]
290b326
fix: added routes without service prefix for b/w compatibility
ShubhranshuSanjeev b177bc9
chore(version): v0.32.1 [skip ci]
d868254
fix: auto-create variantIds dimension
mahatoankitkumar 396c68d
fix: Functions bug fixes
mahatoankitkumar f4dba31
chore(version): v0.32.2 [skip ci]
3005cfc
feat: refactor resolve page
Datron 693a023
chore(version): v0.33.0 [skip ci]
0c61362
feat: Filter Config by prefix
mahatoankitkumar 7856b95
fix: ui bug fix for contexts
SauravCVJuspay fb14036
fix: added type for condition
SauravCVJuspay bd807ec
chore(version): v0.34.0 [skip ci]
6201a2d
fix: filter config fix
mahatoankitkumar 9a458c6
chore(version): v0.34.1 [skip ci]
aad2b7a
fix: JS validator functions to take config value and key
mahatoankitkumar 7b3c3e7
chore(version): v0.34.2 [skip ci]
85751e0
docs: add intro doc and features
knutties af6ea75
feat: haskell client for superposition
Datron 4e2be48
chore: rename superposition to experimentation
Datron 659d384
feat: client interface improvements
Datron 7e859fc
feat: function ui
pratikmishra356 e5164de
feat: added support for dynamic json schema in frontend
sauraww de71bb2
fix: empty key filters should return all keys
Datron 53af262
feat: -js-secure-sandbox
pratikmishra356 233bf7d
chore(version): v0.35.0 [skip ci]
c86b89a
feat: added decimal support in context and override form and fixed d…
sauraww cdc46ce
chore(version): v0.36.0 [skip ci]
606947c
fix: add path to node_modules
pratikmishra356 ebba320
chore(version): v0.36.1 [skip ci]
d170727
feat: added new result, error type and error macros
ShubhranshuSanjeev a99f4af
refactor: refactored service to use new error type and better error …
ShubhranshuSanjeev 4f9f9a6
chore(version): v0.37.0 [skip ci]
59ecc4c
feat: Add function support in dimension and default config form
mahatoankitkumar 9208b3e
chore(version): v0.38.0 [skip ci]
42881c8
fix: added service-prefix to functions endpoints
mahatoankitkumar ea982bf
chore(version): v0.38.1 [skip ci]
6735635
fix: function route fix
pratikmishra356 64560fb
chore(version): v0.38.2 [skip ci]
0cc2e6d
feat: Add filter support to client
mahatoankitkumar 5db1ba4
fix: fixed error in client
mahatoankitkumar 3405b5d
chore(version): v0.39.0 [skip ci]
bdfdaed
fix: removed audit log middleware and reduced max db connection pool…
sauraww 9cf8f81
chore(version): v0.39.1 [skip ci]
f1dca84
feat: created new types crate for superposition movement
Datron 4ae27f2
feat: add auth_type so this can be used when making API calls
Datron 5f7af15
feat: ready for open source!
Datron cdfe3f4
chore(version): v0.40.0 [skip ci]
cbd5b6f
chore: open source superposition
Datron 6085588
chore: add PR testing workflows (#6)
Datron 15840e7
chore: update merge workflow to work (#8)
Datron 3b7e262
fix: post merge release tagging
Datron b1462bc
chore(version): v0.41.0 [skip ci]
6c9eccf
fix: run github merge action only on PR merge
Datron 7af4542
fix: Do not lowercase dmension inputs while resolving (#11)
ayushjain17 5ac099d
feat: Added grouping in default_config page (#9)
mahatoankitkumar 761a69b
fix: merge build setup
Datron 1a9861c
fix: fixed function template (#16)
mahatoankitkumar 8f0db34
chore: trigger semver workflow manually (#18)
Datron a00ff7e
chore(nix): Disable clippy
srid 0ffcf3e
chore(ci): Build using Nix
srid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
target | ||
node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Editor configuration, see https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
insert_final_newline = false | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false | ||
|
||
[makefile] | ||
|
||
charset = utf-8 | ||
indent_style = tab | ||
indent_size = 2 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
DATABASE_URL=postgres://postgres:docker@localhost:5432/config?sslmode=disable | ||
RUST_LOG=debug | ||
AWS_ACCESS_KEY_ID=test | ||
AWS_SECRET_ACCESS_KEY=test | ||
AWS_SESSION_TOKEN=test | ||
AWS_REGION=ap-south-1 | ||
DB_USER=postgres | ||
DB_HOST=dockerdns:5432 | ||
DB_NAME=config | ||
APP_ENV=DEV | ||
AWS_REGION_ENDPOINT=http://localhost:4566 | ||
ALLOW_SAME_KEYS_OVERLAPPING_CTX=true | ||
ALLOW_DIFF_KEYS_OVERLAPPING_CTX=true | ||
ALLOW_SAME_KEYS_NON_OVERLAPPING_CTX=true | ||
CAC_HOST="http://localhost:8080" | ||
API_HOSTNAME="http://localhost:8080" | ||
CONTEXT_AWARE_CONFIG_VERSION="v0.1.0" | ||
HOSTNAME="<application_name>-<deployment_id>-<replicaset>-<pod>" | ||
MJOS_ALLOWED_ORIGINS=https://potato.in,https://onion.in,http://localhost:8080 | ||
ACTIX_KEEP_ALIVE=120 | ||
MAX_DB_CONNECTION_POOL_SIZE=3 | ||
ENABLE_TENANT_AND_SCOPE=true | ||
TENANTS=dev,test | ||
TENANT_MIDDLEWARE_EXCLUSION_LIST="/health,/assets/favicon.ico,/pkg/frontend.js,/pkg,/pkg/frontend_bg.wasm,/pkg/tailwind.css,/pkg/style.css,/assets,/admin,/" | ||
SERVICE_PREFIX="" | ||
SERVICE_NAME="CAC" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @juspay/sdk-backend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## Problem | ||
Describe the problem you are trying to solve here | ||
|
||
## Solution | ||
Provide a brief summary of your solution so that reviewers can understand your code | ||
|
||
## Environment variable changes | ||
|
||
What ENVs need to be added or changed | ||
|
||
## Pre-deployment activity | ||
Things needed to be done before deploying this change (if any) | ||
|
||
## Post-deployment activity | ||
Things needed to be done after deploying this change (if any) | ||
|
||
## API changes | ||
| Endpoint | Method | Request body | Response Body | | ||
| ------------- |:-------------:| -----:| ----------------:| | ||
| API | GET/POST, etc | request | response | | ||
|
||
## Possible Issues in the future | ||
Describe any possible issues that could occur because of this change |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
name: CI Checks on PRs | ||
|
||
on: | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
# Disable incremental compilation. | ||
# | ||
# Incremental compilation is useful as part of an edit-build-test-edit cycle, | ||
# as it lets the compiler avoid recompiling code that hasn't changed. However, | ||
# on CI, we're not making small edits; we're almost always building the entire | ||
# project from scratch. Thus, incremental compilation on CI actually | ||
# introduces *additional* overhead to support making future builds | ||
# faster...but no future builds will ever occur in any given CI environment. | ||
# | ||
# See https://matklad.github.io/2021/09/04/fast-rust-builds.html#ci-workflow | ||
# for details. | ||
CARGO_INCREMENTAL: 0 | ||
# Allow more retries for network requests in cargo (downloading crates) and | ||
# rustup (installing toolchains). This should help to reduce flaky CI failures | ||
# from transient network timeouts or other issues. | ||
CARGO_NET_RETRY: 10 | ||
RUSTUP_MAX_RETRIES: 10 | ||
# Don't emit giant backtraces in the CI logs. | ||
RUST_BACKTRACE: short | ||
# Use cargo's sparse index protocol | ||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | ||
AWS_ACCESS_KEY_ID: test | ||
AWS_SECRET_ACCESS_KEY: test | ||
AWS_SESSION_TOKEN: test | ||
AWS_REGION: ap-south-1 | ||
APP_ENV: "TEST" | ||
|
||
jobs: | ||
formatting: | ||
name: Check formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# - name: Check git settings | ||
# shell: bash | ||
# run: | | ||
# echo "${{ github.event.pull_request.head.ref }}" | ||
# git log --pretty=oneline --abbrev-commit | ||
# echo "----------------" | ||
# git tag "abc_tag" ${{github.event.pull_request.head.sha}} | ||
# git tag | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: 1.76.0 | ||
targets: wasm32-unknown-unknown | ||
components: rustfmt, clippy | ||
|
||
- name: Check formatting | ||
shell: bash | ||
run: cargo fmt --all --check | ||
|
||
- name: install cocogitto | ||
uses: baptiste0928/[email protected] | ||
with: | ||
crate: cocogitto | ||
|
||
- name: Check conventional commit | ||
shell: bash | ||
run: | | ||
git config --global user.name "${{ github.event.pull_request.user.login }}" | ||
git config --global user.email "[email protected]" | ||
commit=$(git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }}) | ||
cog verify "$commit" | ||
|
||
test: | ||
name: Testing | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:12-alpine | ||
ports: | ||
- 5432:5432 | ||
env: | ||
POSTGRES_PASSWORD: "docker" | ||
POSTGRES_DB: "config" | ||
restart: on-failure | ||
|
||
localstack: | ||
image: localstack/localstack:1.3.0 | ||
ports: | ||
- 4510-4559:4510-4559 # external service port range | ||
- 4566:4566 # LocalStack Edge Proxy | ||
- 4571:4571 | ||
env: | ||
LOCALSTACK_SERVICES: kms | ||
AWS_DEFAULT_REGION: ap-south-1 | ||
EDGE_PORT: 4566 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: 1.76.0 | ||
targets: wasm32-unknown-unknown | ||
components: rustfmt, clippy | ||
|
||
- name: install node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.19.0 | ||
|
||
- name: Install wasm-pack | ||
shell: bash | ||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
|
||
- name: run tests | ||
shell: bash | ||
run: | | ||
export DB_PASSWORD=`./docker-compose/localstack/get_db_password.sh | base64 --decode` && echo $DB_PASSWORD | ||
make ci-test | ||
env: | ||
APP_ENV: "TEST" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Create release tags | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: workflow_dispatch | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
tag-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.SUPERPOSITION_TOKEN }} | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: 1.76.0 | ||
targets: wasm32-unknown-unknown | ||
components: rustfmt, clippy | ||
|
||
- name: install cargo-edit to perform set-version | ||
uses: baptiste0928/[email protected] | ||
with: | ||
crate: cargo-edit | ||
|
||
- name: install cocogitto | ||
uses: baptiste0928/[email protected] | ||
with: | ||
crate: cocogitto | ||
|
||
- name: Semver release | ||
shell: bash | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Superposition Bot" | ||
cog bump --auto --skip-ci-override "[skip ci]" | ||
|
||
- name: Push code to main | ||
shell: bash | ||
run: | | ||
git push origin --tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: "CI Nix" | ||
on: | ||
# Run only when pushing to main branch, and making PRs | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-14] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@main | ||
with: | ||
extra-conf: | | ||
trusted-public-keys = cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= | ||
substituters = https://cache.garnix.io?priority=41 https://cache.nixos.org/ | ||
- uses: yaxitech/nix-install-pkgs-action@v3 | ||
with: | ||
packages: "github:srid/nixci" | ||
- run: nixci build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,33 @@ | ||
# These are some examples of commonly ignored file patterns. | ||
# You should customize this list as applicable to your project. | ||
# Learn more about .gitignore: | ||
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore | ||
|
||
# Node artifact files | ||
node_modules/ | ||
dist/ | ||
build/ | ||
|
||
|
||
|
||
/backend/target | ||
|
||
# Compiled Java class files | ||
*.class | ||
|
||
|
||
|
||
*Cargo.lock | ||
|
||
# Compiled Python bytecode | ||
*.py[cod] | ||
|
||
# Log files | ||
*.log | ||
|
||
# Package files | ||
*.jar | ||
|
||
# Maven | ||
# cargo | ||
target/ | ||
dist/ | ||
|
||
# JetBrains IDE | ||
.idea/ | ||
|
||
# Unit test reports | ||
TEST*.xml | ||
|
||
# Generated by MacOS | ||
.DS_Store | ||
|
||
# Generated by Windows | ||
Thumbs.db | ||
|
||
# Applications | ||
*.app | ||
*.exe | ||
*.war | ||
|
||
# Large media files | ||
*.mp4 | ||
*.tiff | ||
*.avi | ||
*.flv | ||
*.mov | ||
*.wmv | ||
|
||
.package-lock.json | ||
|
||
.env | ||
|
||
# nix build outputs | ||
backend/result | ||
backend/.tmp | ||
backend/logfile | ||
backend/*PGSQL* | ||
backend/.env | ||
.direnv | ||
/result | ||
/result-* | ||
clients/haskell/result | ||
clients/haskell/dist-newstyle | ||
# dev | ||
bacon.toml | ||
docker-compose/localstack/export_cyphers.sh | ||
test_logs | ||
.keep | ||
.vscode | ||
*.session.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
edition="2018" | ||
max_width=90 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@srid can this be manually triggered instead of on every pull request and merge to main?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Datron CI should generally run on every PR and on commits to
main
. Why do you want to run it manually? The latter is risky that people may merge broken PRs into main.Also, I think I should re-open the PR because someone seemed to have force-pushed to
main
branch.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@srid You can just rebase, should get rid of the conflicts. Sorry for the trouble, I force pushed to main.
We already have a code check and build with cargo and tests, would
nixci build
do the same thing?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It builds the Rust package (via cargo), runs tests (cargo tests) and effectively makes sure that
flake.nix
remains not-broken for the user.Other checks in the existing action like the one below can also be eventually moved to Nix, so that all of our checks run in CI via Nix. Just like it is in nammayatri. If there's consensus for that, I can help with doing it.
superposition/.github/workflows/ci_check_pr.yaml
Lines 64 to 66 in 01110e2