ci.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. name: Continuous integration
  2. on: [push, pull_request]
  3. jobs:
  4. test:
  5. name: Test
  6. strategy:
  7. fail-fast: false
  8. matrix:
  9. os: [macos-latest, ubuntu-latest, windows-latest]
  10. runs-on: ${{ matrix.os }}
  11. steps:
  12. - name: Checkout
  13. uses: actions/checkout@v4
  14. - name: Install Node.js
  15. uses: actions/[email protected]
  16. with:
  17. node-version: 16.x
  18. - name: Install Godot (Ubuntu)
  19. if: matrix.os == 'ubuntu-latest'
  20. run: |
  21. wget https://github.com/godotengine/godot/releases/download/4.3-stable/Godot_v4.3-stable_linux.x86_64.zip
  22. unzip Godot_v4.3-stable_linux.x86_64.zip
  23. sudo mv Godot_v4.3-stable_linux.x86_64 /usr/local/bin/godot
  24. chmod +x /usr/local/bin/godot
  25. - name: Install Godot (macOS)
  26. if: matrix.os == 'macos-latest'
  27. run: |
  28. curl -L -o Godot.zip https://github.com/godotengine/godot/releases/download/4.3-stable/Godot_v4.3-stable_macos.universal.zip
  29. unzip Godot.zip
  30. sudo mv Godot.app /Applications/Godot.app
  31. sudo ln -s /Applications/Godot.app/Contents/MacOS/Godot /usr/local/bin/godot
  32. - name: Install Godot (Windows)
  33. if: matrix.os == 'windows-latest'
  34. run: |
  35. Invoke-WebRequest -Uri "https://github.com/godotengine/godot/releases/download/4.3-stable/Godot_v4.3-stable_win64.exe.zip" -OutFile "Godot.zip"
  36. Expand-Archive -Path "Godot.zip" -DestinationPath "C:\Godot43"
  37. "C:\Godot43\Godot_v4.3-stable_win64.exe %*" | Out-File -Encoding ascii -FilePath ([Environment]::SystemDirectory+"\godot.cmd")
  38. - name: Install dependencies
  39. run: npm install
  40. - name: Godot init project
  41. run: godot --import test_projects/test-dap-project-godot4/project.godot --headless
  42. - name: Run headless test
  43. uses: coactions/setup-xvfb@v1
  44. with:
  45. run: |
  46. npm run compile
  47. npm test
  48. build:
  49. runs-on: ubuntu-latest
  50. steps:
  51. - name: Checkout
  52. uses: actions/checkout@v4
  53. - name: Install Node.js
  54. uses: actions/[email protected]
  55. with:
  56. node-version: 16.x
  57. - name: Install dependencies
  58. run: npm install
  59. - name: Lint and build extension
  60. run: |
  61. npm run lint
  62. npm run package -- --out godot-tools.vsix
  63. ls -l godot-tools.vsix
  64. - name: Upload extension VSIX
  65. uses: actions/[email protected]
  66. with:
  67. name: godot-tools
  68. path: godot-tools.vsix