test updated workflow #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Mjml CI | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [ 16.x, 18.x, 20.x] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install YARN | |
| run: yarn install | |
| - name: Build through YARN | |
| run: yarn build | |
| - name: Lint through YARN | |
| run: yarn lint | |
| - name: Switch to MJML-Parser-XML | |
| run: cd packages/mjml-parser-xml | |
| - name: Install YARN in MJML-Parser-XML | |
| run: yarn install | |
| - name: Test MJML-Parser-XML debug mode through YARN | |
| run: yarn test --debug | |
| - name: Switch to MJML-Core | |
| run: cd ../../packages/mjml-core | |
| - name: Test MJML-Core debug mode through YARN | |
| run: yarn test --debug | |
| - name: Switch to MJML main package | |
| run: cd ../../packages/mjml | |
| - name: Test the main package through YARN | |
| run: yarn test | |
| - name: Build Windows Executable | |
| run: | |
| pkg -t node18-win-x64 packages/mjml/bin/mjml -o build/windows/mjml.exe | |
| - name: Build Linux Executable | |
| run: | |
| pkg -t node18-linux-x64 packages/mjml/bin/mjml -o build/linux/mjml | |
| - name: Build macOS Executable | |
| run: | |
| pkg -t node18-macos-x64 packages/mjml/bin/mjml -o build/macos/mjml | |
| - name: Upload Linux Executable | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: build/linux/mjml | |
| - name: Upload Windows Executable | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: build/windows/mjml.exe | |
| - name: Upload macOS Executable | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: build/macos/mjml |