Add CI workflow
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
@@ -0,0 +1,54 @@
|
|||||||
|
name: Build & Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-backend:
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up .NET
|
||||||
|
uses: actions/setup-dotnet@v5
|
||||||
|
with:
|
||||||
|
dotnet-version: '10.0.x'
|
||||||
|
|
||||||
|
- name: Restore .NET Tools
|
||||||
|
run: dotnet tool restore
|
||||||
|
|
||||||
|
- name: Check formatting
|
||||||
|
run: dotnet csharpier format .
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: dotnet build
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: dotnet test
|
||||||
|
|
||||||
|
build-frontend:
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ./src/mission-control-client
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Check formatting
|
||||||
|
run: npm run format:check
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: npm test
|
||||||
|
env:
|
||||||
|
TZ: UTC
|
||||||
@@ -20,7 +20,10 @@ describe('dateUtils', () => {
|
|||||||
it('returns readable date when datetime passed is in valid format', () => {
|
it('returns readable date when datetime passed is in valid format', () => {
|
||||||
const date = toReadableDateTime('2026-07-27T23:27:22.1976394+00:00');
|
const date = toReadableDateTime('2026-07-27T23:27:22.1976394+00:00');
|
||||||
|
|
||||||
expect(date).toBe('27/07/2026, 23:27:22');
|
// Date invariants are annoying, test that we are getting back the locale in this case
|
||||||
|
expect(date).toBe(
|
||||||
|
new Date('2026-07-27T23:27:22.1976394+00:00').toLocaleString(),
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user