integration-tests.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. name: Integration Tests
  2. on:
  3. push:
  4. branches: [master]
  5. pull_request:
  6. branches: [master]
  7. permissions:
  8. contents: read
  9. env:
  10. CI: true
  11. TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
  12. TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
  13. jobs:
  14. test:
  15. runs-on: ubuntu-latest
  16. timeout-minutes: 15
  17. strategy:
  18. matrix:
  19. integration:
  20. - content-resolution
  21. - parcel
  22. - postcss-cli
  23. - rollup
  24. - rollup-sass
  25. - tailwindcss-cli
  26. - vite
  27. - webpack-4
  28. - webpack-5
  29. node-version: [18]
  30. fail-fast: false
  31. steps:
  32. - uses: actions/checkout@v3
  33. - name: Use Node.js ${{ matrix.node-version }}
  34. uses: actions/setup-node@v3
  35. with:
  36. node-version: ${{ matrix.node-version }}
  37. cache: 'npm'
  38. - name: Cache node_modules
  39. uses: actions/cache@v3
  40. with:
  41. path: node_modules
  42. key: ${{ runner.os }}-${{ matrix.node-version }}-node_modules-${{ hashFiles('**/package-lock.json') }}
  43. # Cargo already skips downloading dependencies if they already exist
  44. - name: Cache cargo
  45. uses: actions/cache@v3
  46. with:
  47. path: |
  48. ~/.cargo/bin/
  49. ~/.cargo/registry/index/
  50. ~/.cargo/registry/cache/
  51. ~/.cargo/git/db/
  52. target/
  53. key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
  54. # Cache the `oxide` Rust build
  55. - name: Cache oxide build
  56. uses: actions/cache@v3
  57. with:
  58. path: |
  59. ./oxide/target/
  60. ./oxide/crates/node/*.node
  61. ./oxide/crates/node/index.js
  62. ./oxide/crates/node/index.d.ts
  63. key: ${{ runner.os }}-oxide-${{ hashFiles('./oxide/crates/**/*') }}
  64. - name: Install dependencies
  65. run: npm install
  66. - name: Check versions
  67. run: |
  68. echo "Node:" `node --version`
  69. echo "NPM:" `npm --version`
  70. echo "Rust:" `rustc --version`
  71. echo "Cargo:" `cargo --version`
  72. - name: Build Tailwind CSS
  73. run: npx turbo run build --filter=//
  74. - name: Test ${{ matrix.integration }}
  75. run: |
  76. npx turbo run test --filter=./integrations/${{ matrix.integration }} || \
  77. npx turbo run test --filter=./integrations/${{ matrix.integration }} || \
  78. npx turbo run test --filter=./integrations/${{ matrix.integration }} || exit 1