Skip to content

Commit b9ba8d6

Browse files
CI: remove nightly cron schedules, add concurrency groups, increase MIN_PROJECTS_PER_JOB to 8, fix token-swap invariant bug
- Remove schedule/cron triggers from anchor, native, pinocchio, quasar workflows - Add concurrency groups to cancel redundant CI runs on the same branch - Increase MIN_PROJECTS_PER_JOB from 4 to 8 to reduce matrix job count - Fix invariant check in token-swap: pool_a * pool_a → pool_a * pool_b
1 parent 7b153fd commit b9ba8d6

5 files changed

Lines changed: 21 additions & 13 deletions

File tree

.github/workflows/anchor.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Anchor
22

33
on:
4-
schedule:
5-
- cron: "0 0 * * *"
64
push:
75
branches:
86
- main
@@ -11,9 +9,13 @@ on:
119
branches:
1210
- main
1311

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1416
env:
1517
MAX_JOBS: 64
16-
MIN_PROJECTS_PER_JOB: 4
18+
MIN_PROJECTS_PER_JOB: 8
1719
MIN_PROJECTS_FOR_MATRIX: 4
1820
# See https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
1921
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

.github/workflows/native.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Native
22

33
on:
4-
schedule:
5-
- cron: "0 0 * * *"
64
push:
75
branches:
86
- main
@@ -11,9 +9,13 @@ on:
119
branches:
1210
- main
1311

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1416
env:
1517
MAX_JOBS: 64
16-
MIN_PROJECTS_PER_JOB: 4
18+
MIN_PROJECTS_PER_JOB: 8
1719
MIN_PROJECTS_FOR_MATRIX: 4
1820
# See https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
1921
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

.github/workflows/pinocchio.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Pinocchio
22

33
on:
4-
schedule:
5-
- cron: "0 0 * * *"
64
push:
75
branches:
86
- main
@@ -11,9 +9,13 @@ on:
119
branches:
1210
- main
1311

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1416
env:
1517
MAX_JOBS: 64
16-
MIN_PROJECTS_PER_JOB: 4
18+
MIN_PROJECTS_PER_JOB: 8
1719
MIN_PROJECTS_FOR_MATRIX: 4
1820
# See https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
1921
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

.github/workflows/quasar.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Quasar
22

33
on:
4-
schedule:
5-
- cron: "0 0 * * *"
64
push:
75
branches:
86
- main
@@ -11,9 +9,13 @@ on:
119
branches:
1210
- main
1311

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1416
env:
1517
MAX_JOBS: 64
16-
MIN_PROJECTS_PER_JOB: 4
18+
MIN_PROJECTS_PER_JOB: 8
1719
MIN_PROJECTS_FOR_MATRIX: 4
1820
# Force all JavaScript-based actions to use Node.js 24 runtime.
1921
# Node.js 20 actions are deprecated and will stop working June 2026.

tokens/token-swap/anchor/programs/token-swap/src/instructions/swap_exact_tokens_for_tokens.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pub fn handle_swap_exact_tokens_for_tokens(
134134
// We tolerate if the new invariant is higher because it means a rounding error for LPs
135135
context.accounts.pool_account_a.reload()?;
136136
context.accounts.pool_account_b.reload()?;
137-
if invariant > context.accounts.pool_account_a.amount * context.accounts.pool_account_a.amount {
137+
if invariant > context.accounts.pool_account_a.amount * context.accounts.pool_account_b.amount {
138138
return err!(TutorialError::InvariantViolated);
139139
}
140140

0 commit comments

Comments
 (0)