|
| 1 | +name: CodeceptJS |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [master] |
| 6 | + paths: |
| 7 | + - "codeceptjs/**" |
| 8 | + - ".github/workflows/codeceptjs.yml" |
| 9 | + pull_request: |
| 10 | + paths: |
| 11 | + - "codeceptjs/**" |
| 12 | + - ".github/workflows/codeceptjs.yml" |
| 13 | + |
| 14 | +env: |
| 15 | + LAUNCHABLE_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN_CODECEPTJS }} |
| 16 | + LAUNCHABLE_DEBUG: 1 |
| 17 | + LAUNCHABLE_REPORT_ERROR: 1 |
| 18 | + |
| 19 | +jobs: |
| 20 | + tests: |
| 21 | + runs-on: ubuntu-22.04 |
| 22 | + defaults: |
| 23 | + run: |
| 24 | + working-directory: codeceptjs |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 |
| 27 | + with: |
| 28 | + fetch-depth: 0 |
| 29 | + |
| 30 | + # Set up Python for Launchable CLI |
| 31 | + - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #6.0.0 |
| 32 | + with: |
| 33 | + python-version: "3.x" |
| 34 | + |
| 35 | + # Set up Java for Launchable CLI |
| 36 | + - name: Set up JDK 1.8 |
| 37 | + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 #v5.0.0 |
| 38 | + with: |
| 39 | + java-version: 8 |
| 40 | + distribution: "temurin" |
| 41 | + |
| 42 | + # Install Launchable CLI |
| 43 | + - name: Install launchable CLI |
| 44 | + run: | |
| 45 | + pip install launchable |
| 46 | +
|
| 47 | + # Set up Node.js |
| 48 | + - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 #v6.0.0 |
| 49 | + with: |
| 50 | + node-version: 18 |
| 51 | + cache: "npm" |
| 52 | + cache-dependency-path: codeceptjs/package-lock.json |
| 53 | + |
| 54 | + # Install dependencies and Playwright browsers |
| 55 | + - name: Install dependencies |
| 56 | + run: | |
| 57 | + npm ci |
| 58 | + npx playwright install --with-deps chromium |
| 59 | +
|
| 60 | + # Record commits and build with Launchable |
| 61 | + # - name: Record commits and build |
| 62 | + # run: launchable record build --name "$GITHUB_RUN_ID" |
| 63 | + |
| 64 | + # Run CodeceptJS tests |
| 65 | + - name: Run CodeceptJS tests |
| 66 | + run: npm test |
| 67 | + continue-on-error: true |
| 68 | + |
| 69 | + # Record test results with Launchable |
| 70 | + # - name: Record test results |
| 71 | + # run: launchable record tests --build "$GITHUB_RUN_ID" junit ./output/result.xml |
| 72 | + # if: always() |
0 commit comments