mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 21:37:41 +08:00
revert: ci: use sccache-action for caching compilation artifacts (#1880)
This commit is contained in:
11
.github/workflows/CI-pr.yml
vendored
11
.github/workflows/CI-pr.yml
vendored
@ -35,9 +35,6 @@ env:
|
|||||||
RUST_BACKTRACE: short
|
RUST_BACKTRACE: short
|
||||||
# Use cargo's sparse index protocol
|
# Use cargo's sparse index protocol
|
||||||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
||||||
# Enable and use the sccache action for caching
|
|
||||||
SCCACHE_GHA_ENABLED: "true"
|
|
||||||
RUSTC_WRAPPER: "sccache"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
formatting:
|
formatting:
|
||||||
@ -87,7 +84,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
toolchain: 1.65
|
toolchain: 1.65
|
||||||
|
|
||||||
- uses: mozilla-actions/sccache-action@v0.0.3
|
- uses: Swatinem/rust-cache@v2.4.0
|
||||||
|
with:
|
||||||
|
save-if: ${{ github.event_name == 'push' }}
|
||||||
|
|
||||||
- name: Install cargo-hack
|
- name: Install cargo-hack
|
||||||
uses: baptiste0928/cargo-install@v2.1.0
|
uses: baptiste0928/cargo-install@v2.1.0
|
||||||
@ -294,7 +293,9 @@ jobs:
|
|||||||
# with:
|
# with:
|
||||||
# crate: cargo-nextest
|
# crate: cargo-nextest
|
||||||
|
|
||||||
- uses: mozilla-actions/sccache-action@v0.0.3
|
- uses: Swatinem/rust-cache@v2.4.0
|
||||||
|
with:
|
||||||
|
save-if: ${{ github.event_name == 'push' }}
|
||||||
|
|
||||||
# - name: Setup Embark Studios lint rules
|
# - name: Setup Embark Studios lint rules
|
||||||
# shell: bash
|
# shell: bash
|
||||||
|
|||||||
34
.github/workflows/CI-push.yml
vendored
34
.github/workflows/CI-push.yml
vendored
@ -19,32 +19,6 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
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
|
|
||||||
# Enable and use the sccache action for caching
|
|
||||||
SCCACHE_GHA_ENABLED: "true"
|
|
||||||
RUSTC_WRAPPER: "sccache"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
formatting:
|
formatting:
|
||||||
name: Check formatting
|
name: Check formatting
|
||||||
@ -89,7 +63,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
toolchain: 1.65
|
toolchain: 1.65
|
||||||
|
|
||||||
- uses: mozilla-actions/sccache-action@v0.0.3
|
- uses: Swatinem/rust-cache@v2.4.0
|
||||||
|
with:
|
||||||
|
save-if: ${{ github.event_name == 'push' }}
|
||||||
|
|
||||||
- name: Install cargo-hack
|
- name: Install cargo-hack
|
||||||
uses: baptiste0928/cargo-install@v2.0.0
|
uses: baptiste0928/cargo-install@v2.0.0
|
||||||
@ -162,7 +138,9 @@ jobs:
|
|||||||
# with:
|
# with:
|
||||||
# crate: cargo-nextest
|
# crate: cargo-nextest
|
||||||
|
|
||||||
- uses: mozilla-actions/sccache-action@v0.0.3
|
- uses: Swatinem/rust-cache@v2.4.0
|
||||||
|
with:
|
||||||
|
save-if: ${{ github.event_name == 'push' }}
|
||||||
|
|
||||||
# - name: Setup Embark Studios lint rules
|
# - name: Setup Embark Studios lint rules
|
||||||
# shell: bash
|
# shell: bash
|
||||||
|
|||||||
5
.github/workflows/connector-sanity-tests.yml
vendored
5
.github/workflows/connector-sanity-tests.yml
vendored
@ -38,9 +38,6 @@ env:
|
|||||||
RUST_BACKTRACE: short
|
RUST_BACKTRACE: short
|
||||||
# Use cargo's sparse index protocol
|
# Use cargo's sparse index protocol
|
||||||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
||||||
# Enable and use the sccache action for caching
|
|
||||||
SCCACHE_GHA_ENABLED: "true"
|
|
||||||
RUSTC_WRAPPER: "sccache"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test_connectors:
|
test_connectors:
|
||||||
@ -89,7 +86,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
- uses: mozilla-actions/sccache-action@v0.0.3
|
- uses: Swatinem/rust-cache@v2.4.0
|
||||||
|
|
||||||
- name: Decrypt connector auth file
|
- name: Decrypt connector auth file
|
||||||
env:
|
env:
|
||||||
|
|||||||
28
.github/workflows/connector-ui-sanity-tests.yml
vendored
28
.github/workflows/connector-ui-sanity-tests.yml
vendored
@ -2,9 +2,9 @@ name: Connector UI Sanity Tests
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
pull_request_review:
|
pull_request_review:
|
||||||
types:
|
types:
|
||||||
- submitted
|
- submitted
|
||||||
merge_group:
|
merge_group:
|
||||||
types:
|
types:
|
||||||
@ -26,7 +26,7 @@ env:
|
|||||||
#
|
#
|
||||||
# See https://matklad.github.io/2021/09/04/fast-rust-builds.html#ci-workflow
|
# See https://matklad.github.io/2021/09/04/fast-rust-builds.html#ci-workflow
|
||||||
# for details.
|
# for details.
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 1
|
||||||
# Allow more retries for network requests in cargo (downloading crates) and
|
# Allow more retries for network requests in cargo (downloading crates) and
|
||||||
# rustup (installing toolchains). This should help to reduce flaky CI failures
|
# rustup (installing toolchains). This should help to reduce flaky CI failures
|
||||||
# from transient network timeouts or other issues.
|
# from transient network timeouts or other issues.
|
||||||
@ -36,9 +36,6 @@ env:
|
|||||||
RUST_BACKTRACE: short
|
RUST_BACKTRACE: short
|
||||||
# Use cargo's sparse index protocol
|
# Use cargo's sparse index protocol
|
||||||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
||||||
# Enable and use the sccache action for caching
|
|
||||||
SCCACHE_GHA_ENABLED: "true"
|
|
||||||
RUSTC_WRAPPER: "sccache"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test_connectors:
|
test_connectors:
|
||||||
@ -76,13 +73,14 @@ jobs:
|
|||||||
# do not use more than 2 runners, try to group less time taking connectors together
|
# do not use more than 2 runners, try to group less time taking connectors together
|
||||||
- stripe,airwallex,bluesnap,checkout,trustpay_3ds,payu,authorizedotnet,aci,noon
|
- stripe,airwallex,bluesnap,checkout,trustpay_3ds,payu,authorizedotnet,aci,noon
|
||||||
- adyen_uk,shift4,worldline,multisafepay,paypal,mollie,nexinets
|
- adyen_uk,shift4,worldline,multisafepay,paypal,mollie,nexinets
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Ignore Tests incase of pull request
|
- name: Ignore Tests incase of pull request
|
||||||
if: github.event_name == 'pull_request' || github.event_name == 'merge_group'
|
if: github.event_name == 'pull_request' || github.event_name == 'merge_group'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Skipped tests as the event is pull request"
|
echo "Skipped tests as the event is pull request"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@ -107,34 +105,34 @@ jobs:
|
|||||||
run: echo "CONNECTOR_TESTS_FILE_PATH=$HOME/target/test/connector_tests.json" >> $GITHUB_ENV
|
run: echo "CONNECTOR_TESTS_FILE_PATH=$HOME/target/test/connector_tests.json" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set ignore_browser_profile usage in env
|
- name: Set ignore_browser_profile usage in env
|
||||||
if: (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || (github.event_name == 'workflow_dispatch')
|
if: (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || (github.event_name == 'workflow_dispatch')
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "IGNORE_BROWSER_PROFILE=true" >> $GITHUB_ENV
|
run: echo "IGNORE_BROWSER_PROFILE=true" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Install latest compiler
|
- name: Install latest compiler
|
||||||
if: (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || (github.event_name == 'workflow_dispatch')
|
if: (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || (github.event_name == 'workflow_dispatch')
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
- uses: mozilla-actions/sccache-action@v0.0.3
|
- uses: Swatinem/rust-cache@v2.4.0
|
||||||
|
|
||||||
- uses: baptiste0928/cargo-install@v2.1.0
|
- uses: baptiste0928/cargo-install@v2.1.0
|
||||||
if: (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || (github.event_name == 'workflow_dispatch')
|
if: (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || (github.event_name == 'workflow_dispatch')
|
||||||
with:
|
with:
|
||||||
crate: diesel_cli
|
crate: diesel_cli
|
||||||
features: postgres
|
features: postgres
|
||||||
args: "--no-default-features"
|
args: "--no-default-features"
|
||||||
|
|
||||||
- name: Diesel migration run
|
- name: Diesel migration run
|
||||||
if: (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || (github.event_name == 'workflow_dispatch')
|
if: (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || (github.event_name == 'workflow_dispatch')
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: postgres://db_user:db_pass@localhost:5432/hyperswitch_db
|
DATABASE_URL: postgres://db_user:db_pass@localhost:5432/hyperswitch_db
|
||||||
run: diesel migration run
|
run: diesel migration run
|
||||||
|
|
||||||
- name: Start server and run tests
|
- name: Start server and run tests
|
||||||
if: (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || (github.event_name == 'workflow_dispatch')
|
if: (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || (github.event_name == 'workflow_dispatch')
|
||||||
env:
|
env:
|
||||||
UI_TESTCASES_PATH: ${{ secrets.UI_TESTCASES_PATH }}
|
UI_TESTCASES_PATH: ${{ secrets.UI_TESTCASES_PATH }}
|
||||||
INPUT: ${{ matrix.connector }}
|
INPUT: ${{ matrix.connector }}
|
||||||
@ -142,12 +140,12 @@ jobs:
|
|||||||
run: sh .github/scripts/run_ui_tests.sh
|
run: sh .github/scripts/run_ui_tests.sh
|
||||||
|
|
||||||
- name: View test results
|
- name: View test results
|
||||||
if: (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || (github.event_name == 'workflow_dispatch')
|
if: (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || (github.event_name == 'workflow_dispatch')
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cat tests/test_results.log
|
run: cat tests/test_results.log
|
||||||
|
|
||||||
- name: Check test results
|
- name: Check test results
|
||||||
if: (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || (github.event_name == 'workflow_dispatch')
|
if: (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || (github.event_name == 'workflow_dispatch')
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if test "$( grep 'test result: FAILED' -r tests/test_results.log | wc -l )" -gt "0"; then
|
if test "$( grep 'test result: FAILED' -r tests/test_results.log | wc -l )" -gt "0"; then
|
||||||
|
|||||||
14
.github/workflows/postman-collection-runner.yml
vendored
14
.github/workflows/postman-collection-runner.yml
vendored
@ -16,9 +16,7 @@ env:
|
|||||||
RUSTUP_MAX_RETRIES: 10
|
RUSTUP_MAX_RETRIES: 10
|
||||||
RUST_BACKTRACE: short
|
RUST_BACKTRACE: short
|
||||||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
||||||
CONNECTORS: "aci, adyen_uk, airwallex, authorizedotnet, bambora, bambora_3ds, bluesnap, checkout, globalpay, mollie, nexinets, nmi, shift4, stripe, trustpay, worldline"
|
CONNECTORS: aci, adyen_uk, airwallex, authorizedotnet, bambora, bambora_3ds, bluesnap, checkout, globalpay, mollie, nexinets, nmi, shift4, stripe, trustpay, worldline
|
||||||
SCCACHE_GHA_ENABLED: "true"
|
|
||||||
RUSTC_WRAPPER: "sccache"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
runner:
|
runner:
|
||||||
@ -35,7 +33,6 @@ jobs:
|
|||||||
--health-retries 5
|
--health-retries 5
|
||||||
ports:
|
ports:
|
||||||
- 6379:6379
|
- 6379:6379
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: "${{ github.event_name != 'pull_request' && 'postgres:14.5' || '' }}"
|
image: "${{ github.event_name != 'pull_request' && 'postgres:14.5' || '' }}"
|
||||||
env:
|
env:
|
||||||
@ -55,7 +52,7 @@ jobs:
|
|||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Skipped tests as the event is pull request"
|
echo "Skipped tests as the event is pull request"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
- name: Repository checkout
|
- name: Repository checkout
|
||||||
@ -90,8 +87,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
- uses: mozilla-actions/sccache-action@v0.0.3
|
- name: Build and Cache Rust Dependencies
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
|
uses: Swatinem/rust-cache@v2.4.0
|
||||||
|
|
||||||
- name: Install Diesel CLI with Postgres Support
|
- name: Install Diesel CLI with Postgres Support
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
@ -114,12 +112,12 @@ jobs:
|
|||||||
cargo run &
|
cargo run &
|
||||||
COUNT=0
|
COUNT=0
|
||||||
# Wait for the server to start in port 8080
|
# Wait for the server to start in port 8080
|
||||||
while netstat -lnt | awk '$4 ~ /:8080$/ {exit 1}'; do
|
while netstat -lnt | awk '$4 ~ /:8080$/ {exit 1}'; do
|
||||||
# Wait for 15 mins to start otherwise kill the task
|
# Wait for 15 mins to start otherwise kill the task
|
||||||
if [ $COUNT -gt 90 ];
|
if [ $COUNT -gt 90 ];
|
||||||
then
|
then
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
COUNT=$((COUNT+1))
|
COUNT=$((COUNT+1))
|
||||||
sleep 10
|
sleep 10
|
||||||
fi
|
fi
|
||||||
|
|||||||
28
.github/workflows/validate-openapi-spec.yml
vendored
28
.github/workflows/validate-openapi-spec.yml
vendored
@ -11,32 +11,6 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
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
|
|
||||||
# Enable and use the sccache action for caching
|
|
||||||
SCCACHE_GHA_ENABLED: "true"
|
|
||||||
RUSTC_WRAPPER: "sccache"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate_json:
|
validate_json:
|
||||||
name: Validate generated OpenAPI spec file
|
name: Validate generated OpenAPI spec file
|
||||||
@ -61,8 +35,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
- uses: mozilla-actions/sccache-action@v0.0.3
|
|
||||||
|
|
||||||
- name: Generate the OpenAPI spec file
|
- name: Generate the OpenAPI spec file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cargo run --features openapi -- generate-openapi-spec
|
run: cargo run --features openapi -- generate-openapi-spec
|
||||||
|
|||||||
Reference in New Issue
Block a user