Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Release

# On every push to main, re-run the CI gate and then hand off to
# semantic-release. It reads the conventional commits since the last tag,
# computes the bump (feat -> minor, BREAKING CHANGE -> major, everything else
# -> patch, per .releaserc.json), updates package.json + CHANGELOG.md, tags,
# creates the GitHub release, and publishes to npm with provenance.
# On every push to main, build the package and hand off to semantic-release.
# It reads the conventional commits since the last tag, computes the bump
# (feat -> minor, BREAKING CHANGE -> major, everything else -> patch, per
# .releaserc.json), updates package.json + CHANGELOG.md, tags, creates the
# GitHub release, and publishes to npm with provenance.
#
# Nothing publishes unless the gate passes. semantic-release itself no-ops when
# Tests are NOT re-run here: ci.yml gates lint/unit/integration on every PR, so
# main is already verified before this runs. Re-running the full suite in the
# publish path only adds flaky-failure surface. semantic-release no-ops when
# there are no releasable commits, so an empty run is harmless.
on:
push:
Expand Down Expand Up @@ -42,17 +44,11 @@ jobs:

- run: npm ci --ignore-scripts

# --- CI gate (mirrors ci.yml). No publish if any of these fail. ---
- name: Lint
run: npm run lint
- name: Circular dependency check
run: npm run circular
# Lint / unit / integration tests already gate every PR before it can
# merge to main (see ci.yml), so main is verified by the time this runs.
# Here we only rebuild to confirm the package is publishable, then release.
- name: Build
run: npm run build
- name: Unit tests
run: npm run test
- name: Integration tests
run: npm run test:integration:only

# --- Release (no-ops when there are no releasable commits) ---
- name: semantic-release
Expand Down
12 changes: 6 additions & 6 deletions src/objects/__tests__/Satellite.propagator-accuracy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@
*/
describe('Propagator accuracy vs OEM truth data (NORAD 39208)', () => {
// First TLE from the dataset (epoch: 2020-366.90899438 = 2020-12-31T21:48:57.114 UTC)
const tle1_39208 = '1 39208U 13037A 20366.90899438 .00000088 00000-0 23522-4 0 11' as TleLine1;

Check warning on line 404 in src/objects/__tests__/Satellite.propagator-accuracy.test.ts

View workflow job for this annotation

GitHub Actions / lint

Identifier 'tle1_39208' is not in camel case
const tle2_39208 = '2 39208 98.0102 4.5055 0008785 14.2424 345.9028 14.68405624399392' as TleLine2;

Check warning on line 405 in src/objects/__tests__/Satellite.propagator-accuracy.test.ts

View workflow job for this annotation

GitHub Actions / lint

Identifier 'tle2_39208' is not in camel case

const tleEpochDate = new Date(Date.UTC(2020, 11, 31, 21, 48, 57, 114));

Expand Down Expand Up @@ -475,7 +475,7 @@
};

it('SGP4 from first TLE should match OEM truth at TLE epoch', () => {
const sat = new Satellite({ tle1: tle1_39208, tle2: tle2_39208, name: 'SHIYAN-7' });

Check warning on line 478 in src/objects/__tests__/Satellite.propagator-accuracy.test.ts

View workflow job for this annotation

GitHub Actions / lint

Identifier 'tle2_39208' is not in camel case

Check warning on line 478 in src/objects/__tests__/Satellite.propagator-accuracy.test.ts

View workflow job for this annotation

GitHub Actions / lint

Identifier 'tle1_39208' is not in camel case
const sgp4 = sat.createSgp4Propagator();
const epoch = EpochUTC.fromDateTime(truthData[0].date);
const state = sgp4.propagate(epoch);
Expand All @@ -488,7 +488,7 @@
});

it('numerical propagator initialized from proper J2000 should match truth at epoch', () => {
const sat = new Satellite({ tle1: tle1_39208, tle2: tle2_39208, name: 'SHIYAN-7' });

Check warning on line 491 in src/objects/__tests__/Satellite.propagator-accuracy.test.ts

View workflow job for this annotation

GitHub Actions / lint

Identifier 'tle2_39208' is not in camel case

Check warning on line 491 in src/objects/__tests__/Satellite.propagator-accuracy.test.ts

View workflow job for this annotation

GitHub Actions / lint

Identifier 'tle1_39208' is not in camel case
const sgp4 = sat.createSgp4Propagator();
const epoch = EpochUTC.fromDateTime(tleEpochDate);

Expand All @@ -505,7 +505,7 @@
});

it('all propagators should produce LEO-consistent states at every truth point', () => {
const sat = new Satellite({ tle1: tle1_39208, tle2: tle2_39208, name: 'SHIYAN-7' });

Check warning on line 508 in src/objects/__tests__/Satellite.propagator-accuracy.test.ts

View workflow job for this annotation

GitHub Actions / lint

Identifier 'tle2_39208' is not in camel case

Check warning on line 508 in src/objects/__tests__/Satellite.propagator-accuracy.test.ts

View workflow job for this annotation

GitHub Actions / lint

Identifier 'tle1_39208' is not in camel case
const sgp4 = sat.createSgp4Propagator();
const initEpoch = EpochUTC.fromDateTime(tleEpochDate);
const initJ2000 = sgp4.propagate(initEpoch);
Expand Down Expand Up @@ -555,10 +555,10 @@
expect(velMag).toBeLessThan(8);
}
}
}, 15_000);
}, 60_000);

it('SGP4 prediction error should grow with time from TLE epoch', () => {
const sat = new Satellite({ tle1: tle1_39208, tle2: tle2_39208, name: 'SHIYAN-7' });

Check warning on line 561 in src/objects/__tests__/Satellite.propagator-accuracy.test.ts

View workflow job for this annotation

GitHub Actions / lint

Identifier 'tle1_39208' is not in camel case
const sgp4 = sat.createSgp4Propagator();

const errors: number[] = [];
Expand Down Expand Up @@ -703,7 +703,7 @@
for (const r of results) {
expect(r.pm).toBeGreaterThan(r.j2);
}
}, 15_000);
}, 60_000);

it('gravity-aware propagators should track truth through 28 days', () => {
const sat = new Satellite({ tle1: tle1_39208, tle2: tle2_39208, name: 'SHIYAN-7' });
Expand Down Expand Up @@ -998,7 +998,7 @@

expect(errJ2).toBeLessThan(errPM);
}
}, 15_000);
}, 60_000);

it('error growth comparison across force models (6h to 3d)', () => {
const initJ2000 = sp3ToJ2000(sp3TruthData[0]);
Expand Down Expand Up @@ -1090,7 +1090,7 @@

// J2 and 8x8 should be close (both model oblateness)
expect(Math.abs(errJ2 - err8x8)).toBeLessThan(20);
}, 15_000);
}, 60_000);

// ==================== Cross-propagator consistency ====================

Expand All @@ -1115,7 +1115,7 @@
// Two adaptive integrators with default tolerance should agree to ~meters
expect(diff).toBeLessThan(0.1); // Within 100 meters
}
}, 15_000);
}, 60_000);

// ==================== Velocity accuracy ====================

Expand Down Expand Up @@ -1185,7 +1185,7 @@
expect(velMag).toBeLessThan(7.5);
}
}
}, 15_000);
}, 60_000);

// ==================== Summary Report ====================

Expand Down
Loading