diff --git a/.gitea/workflows/build-test.yml b/.gitea/workflows/build-test.yml new file mode 100644 index 0000000..39fc447 --- /dev/null +++ b/.gitea/workflows/build-test.yml @@ -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 \ No newline at end of file diff --git a/src/mission-control-client/src/utils/dateUtils.test.ts b/src/mission-control-client/src/utils/dateUtils.test.ts index f20519a..4b97057 100644 --- a/src/mission-control-client/src/utils/dateUtils.test.ts +++ b/src/mission-control-client/src/utils/dateUtils.test.ts @@ -20,7 +20,10 @@ describe('dateUtils', () => { it('returns readable date when datetime passed is in valid format', () => { 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(), + ); }); }); });