feat: Ajout de CIUnverified
d3dd978 parent: 2bde847 added
.github/workflows/ci.yml +88 -0 | new file mode 100644 | ||
| @@ -0,0 +1,88 @@ | ||
| 1 | +name: CI | |
| 2 | + | |
| 3 | +on: | |
| 4 | + push: | |
| 5 | + branches: [enterprise-version] | |
| 6 | + pull_request: | |
| 7 | + | |
| 8 | +jobs: | |
| 9 | + build: | |
| 10 | + name: Build | |
| 11 | + runs-on: ubuntu-latest | |
| 12 | + steps: | |
| 13 | + - name: Checkout road-trip | |
| 14 | + uses: actions/checkout@v4 | |
| 15 | + with: | |
| 16 | + path: roadTrip | |
| 17 | + | |
| 18 | + # road-trip depends on ../ui-kit/dist/ui-kit (pnpm link) | |
| 19 | + - name: Checkout ui-kit | |
| 20 | + env: | |
| 21 | + UIKIT_REPO_URL: https://rickub.com/yatho/demo-angular-migration-uikit.git | |
| 22 | + run: git clone --depth 1 "$UIKIT_REPO_URL" ui-kit | |
| 23 | + | |
| 24 | + - uses: pnpm/action-setup@v4 | |
| 25 | + with: | |
| 26 | + version: 9 | |
| 27 | + | |
| 28 | + - uses: actions/setup-node@v4 | |
| 29 | + with: | |
| 30 | + node-version: 20 | |
| 31 | + cache: pnpm | |
| 32 | + cache-dependency-path: | | |
| 33 | + roadTrip/pnpm-lock.yaml | |
| 34 | + ui-kit/pnpm-lock.yaml | |
| 35 | + | |
| 36 | + - name: Build ui-kit | |
| 37 | + working-directory: ui-kit | |
| 38 | + run: | | |
| 39 | + pnpm install --frozen-lockfile | |
| 40 | + pnpm build | |
| 41 | + | |
| 42 | + - name: Install road-trip | |
| 43 | + working-directory: roadTrip | |
| 44 | + run: pnpm install --frozen-lockfile | |
| 45 | + | |
| 46 | + - name: Build road-trip | |
| 47 | + working-directory: roadTrip | |
| 48 | + run: pnpm build | |
| 49 | + | |
| 50 | + test: | |
| 51 | + name: Test | |
| 52 | + runs-on: ubuntu-latest | |
| 53 | + steps: | |
| 54 | + - name: Checkout road-trip | |
| 55 | + uses: actions/checkout@v4 | |
| 56 | + with: | |
| 57 | + path: roadTrip | |
| 58 | + | |
| 59 | + - name: Checkout ui-kit | |
| 60 | + env: | |
| 61 | + UIKIT_REPO_URL: https://rickub.com/yatho/demo-angular-migration-uikit.git | |
| 62 | + run: git clone --depth 1 "$UIKIT_REPO_URL" ui-kit | |
| 63 | + | |
| 64 | + - uses: pnpm/action-setup@v4 | |
| 65 | + with: | |
| 66 | + version: 9 | |
| 67 | + | |
| 68 | + - uses: actions/setup-node@v4 | |
| 69 | + with: | |
| 70 | + node-version: 20 | |
| 71 | + cache: pnpm | |
| 72 | + cache-dependency-path: | | |
| 73 | + roadTrip/pnpm-lock.yaml | |
| 74 | + ui-kit/pnpm-lock.yaml | |
| 75 | + | |
| 76 | + - name: Build ui-kit | |
| 77 | + working-directory: ui-kit | |
| 78 | + run: | | |
| 79 | + pnpm install --frozen-lockfile | |
| 80 | + pnpm build | |
| 81 | + | |
| 82 | + - name: Install road-trip | |
| 83 | + working-directory: roadTrip | |
| 84 | + run: pnpm install --frozen-lockfile | |
| 85 | + | |
| 86 | + - name: Test road-trip | |
| 87 | + working-directory: roadTrip | |
| 88 | + run: pnpm test --no-watch --karma-config=karma.ci.conf.js | |
| new file mode 100644 | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | +name: CI | ||
| 2 | + | ||
| 3 | +on: | ||
| 4 | + push: | ||
| 5 | + branches: [enterprise-version] | ||
| 6 | + pull_request: | ||
| 7 | + | ||
| 8 | +jobs: | ||
| 9 | + build: | ||
| 10 | + name: Build | ||
| 11 | + runs-on: ubuntu-latest | ||
| 12 | + steps: | ||
| 13 | + - name: Checkout road-trip | ||
| 14 | + uses: actions/checkout@v4 | ||
| 15 | + with: | ||
| 16 | + path: roadTrip | ||
| 17 | + | ||
| 18 | + # road-trip depends on ../ui-kit/dist/ui-kit (pnpm link) | ||
| 19 | + - name: Checkout ui-kit | ||
| 20 | + env: | ||
| 21 | + UIKIT_REPO_URL: https://rickub.com/yatho/demo-angular-migration-uikit.git | ||
| 22 | + run: git clone --depth 1 "$UIKIT_REPO_URL" ui-kit | ||
| 23 | + | ||
| 24 | + - uses: pnpm/action-setup@v4 | ||
| 25 | + with: | ||
| 26 | + version: 9 | ||
| 27 | + | ||
| 28 | + - uses: actions/setup-node@v4 | ||
| 29 | + with: | ||
| 30 | + node-version: 20 | ||
| 31 | + cache: pnpm | ||
| 32 | + cache-dependency-path: | | ||
| 33 | + roadTrip/pnpm-lock.yaml | ||
| 34 | + ui-kit/pnpm-lock.yaml | ||
| 35 | + | ||
| 36 | + - name: Build ui-kit | ||
| 37 | + working-directory: ui-kit | ||
| 38 | + run: | | ||
| 39 | + pnpm install --frozen-lockfile | ||
| 40 | + pnpm build | ||
| 41 | + | ||
| 42 | + - name: Install road-trip | ||
| 43 | + working-directory: roadTrip | ||
| 44 | + run: pnpm install --frozen-lockfile | ||
| 45 | + | ||
| 46 | + - name: Build road-trip | ||
| 47 | + working-directory: roadTrip | ||
| 48 | + run: pnpm build | ||
| 49 | + | ||
| 50 | + test: | ||
| 51 | + name: Test | ||
| 52 | + runs-on: ubuntu-latest | ||
| 53 | + steps: | ||
| 54 | + - name: Checkout road-trip | ||
| 55 | + uses: actions/checkout@v4 | ||
| 56 | + with: | ||
| 57 | + path: roadTrip | ||
| 58 | + | ||
| 59 | + - name: Checkout ui-kit | ||
| 60 | + env: | ||
| 61 | + UIKIT_REPO_URL: https://rickub.com/yatho/demo-angular-migration-uikit.git | ||
| 62 | + run: git clone --depth 1 "$UIKIT_REPO_URL" ui-kit | ||
| 63 | + | ||
| 64 | + - uses: pnpm/action-setup@v4 | ||
| 65 | + with: | ||
| 66 | + version: 9 | ||
| 67 | + | ||
| 68 | + - uses: actions/setup-node@v4 | ||
| 69 | + with: | ||
| 70 | + node-version: 20 | ||
| 71 | + cache: pnpm | ||
| 72 | + cache-dependency-path: | | ||
| 73 | + roadTrip/pnpm-lock.yaml | ||
| 74 | + ui-kit/pnpm-lock.yaml | ||
| 75 | + | ||
| 76 | + - name: Build ui-kit | ||
| 77 | + working-directory: ui-kit | ||
| 78 | + run: | | ||
| 79 | + pnpm install --frozen-lockfile | ||
| 80 | + pnpm build | ||
| 81 | + | ||
| 82 | + - name: Install road-trip | ||
| 83 | + working-directory: roadTrip | ||
| 84 | + run: pnpm install --frozen-lockfile | ||
| 85 | + | ||
| 86 | + - name: Test road-trip | ||
| 87 | + working-directory: roadTrip | ||
| 88 | + run: pnpm test --no-watch --karma-config=karma.ci.conf.js | ||
added
karma.ci.conf.js +22 -0 | new file mode 100644 | ||
| @@ -0,0 +1,22 @@ | ||
| 1 | +module.exports = function (config) { | |
| 2 | + config.set({ | |
| 3 | + basePath: '', | |
| 4 | + frameworks: ['jasmine', '@angular-devkit/build-angular'], | |
| 5 | + plugins: [ | |
| 6 | + require('karma-jasmine'), | |
| 7 | + require('karma-chrome-launcher'), | |
| 8 | + require('karma-coverage'), | |
| 9 | + require('@angular-devkit/build-angular/plugins/karma'), | |
| 10 | + ], | |
| 11 | + reporters: ['progress'], | |
| 12 | + browsers: ['ChromeHeadlessCI'], | |
| 13 | + customLaunchers: { | |
| 14 | + ChromeHeadlessCI: { | |
| 15 | + base: 'ChromeHeadless', | |
| 16 | + flags: ['--no-sandbox', '--disable-gpu'], | |
| 17 | + }, | |
| 18 | + }, | |
| 19 | + singleRun: true, | |
| 20 | + restartOnFileChange: false, | |
| 21 | + }); | |
| 22 | +}; | |
| new file mode 100644 | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | +module.exports = function (config) { | ||
| 2 | + config.set({ | ||
| 3 | + basePath: '', | ||
| 4 | + frameworks: ['jasmine', '@angular-devkit/build-angular'], | ||
| 5 | + plugins: [ | ||
| 6 | + require('karma-jasmine'), | ||
| 7 | + require('karma-chrome-launcher'), | ||
| 8 | + require('karma-coverage'), | ||
| 9 | + require('@angular-devkit/build-angular/plugins/karma'), | ||
| 10 | + ], | ||
| 11 | + reporters: ['progress'], | ||
| 12 | + browsers: ['ChromeHeadlessCI'], | ||
| 13 | + customLaunchers: { | ||
| 14 | + ChromeHeadlessCI: { | ||
| 15 | + base: 'ChromeHeadless', | ||
| 16 | + flags: ['--no-sandbox', '--disable-gpu'], | ||
| 17 | + }, | ||
| 18 | + }, | ||
| 19 | + singleRun: true, | ||
| 20 | + restartOnFileChange: false, | ||
| 21 | + }); | ||
| 22 | +}; | ||