add typecheckers in ci

pull/13/head
Override-6 1 year ago committed by maxime.batista
parent 2e4f2eb10c
commit 185a4d19bb

@ -1,6 +1,6 @@
kind: pipeline kind: pipeline
type: docker type: docker
name: "Deploy on maxou.dev" name: "CI and Deploy on maxou.dev"
volumes: volumes:
- name: server - name: server
@ -11,11 +11,26 @@ trigger:
- push - push
steps: steps:
- image: node:latest
name: "front CI"
commands:
- npm install
- npm run tsc
- image: composer:latest
name: "php CI"
commands:
- composer install && composer update
- vendor/bin/phpstan analyze
- image: node:latest - image: node:latest
name: "build node" name: "build node"
volumes: &outputs volumes: &outputs
- name: server - name: server
path: /outputs path: /outputs
depends_on:
- "front CI"
commands: commands:
- curl -L moshell.dev/setup.sh > /tmp/moshell_setup.sh - curl -L moshell.dev/setup.sh > /tmp/moshell_setup.sh
- chmod +x /tmp/moshell_setup.sh - chmod +x /tmp/moshell_setup.sh
@ -24,14 +39,15 @@ steps:
- -
- /root/.local/bin/moshell ci/build_react.msh - /root/.local/bin/moshell ci/build_react.msh
- image: composer:latest - image: ubuntu:latest
name: "prepare php" name: "prepare php"
volumes: *outputs volumes: *outputs
depends_on:
- "php CI"
commands: commands:
- mkdir -p /outputs/public - mkdir -p /outputs/public
# this sed command will replace the included `profile/dev-config-profile.php` to `profile/prod-config-file.php` in the config.php file. # this sed command will replace the included `profile/dev-config-profile.php` to `profile/prod-config-file.php` in the config.php file.
- sed -iE 's/\\/\\*PROFILE_FILE\\*\\/\\s*".*"/"profiles\\/prod-config-profile.php"/' config.php - sed -iE 's/\\/\\*PROFILE_FILE\\*\\/\\s*".*"/"profiles\\/prod-config-profile.php"/' config.php
- composer install && composer update
- rm profiles/dev-config-profile.php - rm profiles/dev-config-profile.php
- mv src config.php sql profiles vendor /outputs/ - mv src config.php sql profiles vendor /outputs/

@ -3,13 +3,14 @@
mkdir -p /outputs/public mkdir -p /outputs/public
apt update && apt install jq -y apt update && apt install jq -y
npm install
val drone_branch = std::env("DRONE_BRANCH").unwrap() val drone_branch = std::env("DRONE_BRANCH").unwrap()
val base = "/IQBall/$drone_branch/public" val base = "/IQBall/$drone_branch/public"
npm run build -- --base=$base --mode PROD npm run build -- --base=$base --mode PROD
npm run build -- --base=/IQBall/public --mode PROD
// Read generated mappings from build // Read generated mappings from build
val result = $(jq -r 'to_entries|map(.key + " " +.value.file)|.[]' dist/manifest.json) val result = $(jq -r 'to_entries|map(.key + " " +.value.file)|.[]' dist/manifest.json)
val mappings = $result.split('\n') val mappings = $result.split('\n')

Loading…
Cancel
Save