Skip to content

Allow time zone to be omitted when creating users via API #1959

Allow time zone to be omitted when creating users via API

Allow time zone to be omitted when creating users via API #1959

Workflow file for this run

name: CI
on: push
permissions:
contents: read
jobs:
build:
name: Build and test
runs-on: ubuntu-24.04
env:
WEB_PROJECT_PATH: src/Buttercup.Web
services:
mailpit:
image: axllent/mailpit
ports:
- 8025:8025
redis:
image: redis
ports:
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.1xx
dotnet-quality: ga
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: ${{env.WEB_PROJECT_PATH}}/.nvmrc
cache: npm
cache-dependency-path: ${{env.WEB_PROJECT_PATH}}/package-lock.json
- name: Set SHORT_COMMIT_SHA
run: echo "SHORT_COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Restore .NET tools
run: dotnet tool restore
- name: Restore Node.js dependencies
run: npm ci
working-directory: ${{env.WEB_PROJECT_PATH}}
- name: Build .NET solution
run: dotnet build --configuration Release /WarnAsError
- name: Build assets
run: npx gulp build
working-directory: ${{env.WEB_PROJECT_PATH}}
- name: Start MySQL Server
run: sudo systemctl start mysql.service
- name: Create MySQL user
run: mysql -uroot -proot < scripts/create-dev-user.sql
- name: Run .NET tests
run: dotnet test --no-build --configuration Release --collect "XPlat Code Coverage"
- name: Report .NET test coverage
if: ${{ hashFiles('**/coverage.cobertura.xml') }}
run: |
./scripts/build-dotnet-coverage-report.sh -reporttypes:TextSummary
cat coverage/Summary.txt
- name: Run Jest tests
run: npx jest --coverage
working-directory: ${{env.WEB_PROJECT_PATH}}
- name: Install Playwright browsers
run: npx playwright install --with-deps
working-directory: ${{env.WEB_PROJECT_PATH}}
- name: Run Playwright tests
run: npx playwright test
working-directory: ${{env.WEB_PROJECT_PATH}}
env:
CreateDatabaseOnStartup: true
- name: Upload Playwright test results
if: "!cancelled()"
uses: actions/upload-artifact@v4
with:
name: playwright-results
path: ${{env.WEB_PROJECT_PATH}}/.playwright/results
if-no-files-found: ignore
- name: Check formatting
run: npx prettier -c .
working-directory: ${{env.WEB_PROJECT_PATH}}
- name: Lint scripts
run: npx eslint .
working-directory: ${{env.WEB_PROJECT_PATH}}
- name: Lint styles
run: npx stylelint --max-warnings 0 styles/
working-directory: ${{env.WEB_PROJECT_PATH}}