|
4 | 4 | pull_request:
|
5 | 5 | branches:
|
6 | 6 | - develop
|
| 7 | + |
7 | 8 | jobs:
|
8 | 9 | build:
|
9 |
| - name: Build and cache |
10 |
| - runs-on: ubuntu-latest |
11 |
| - steps: |
12 |
| - - uses: actions/checkout@v3 |
13 |
| - - name: install node |
14 |
| - uses: actions/setup-node@v3 |
15 |
| - with: |
16 |
| - node-version-file: '.nvmrc' |
17 |
| - - uses: actions/cache@v3 |
18 |
| - id: cache-node |
19 |
| - with: |
20 |
| - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} |
21 |
| - path: | |
22 |
| - node_modules |
23 |
| - ~/.cache |
24 |
| - ~/.npm |
25 |
| - - uses: actions/cache@v3 |
26 |
| - id: cache-build |
27 |
| - with: |
28 |
| - key: ${{ runner.os }}-build-${{ hashFiles('src/**/*') }} |
29 |
| - path: | |
30 |
| - dist |
31 |
| - languages |
32 |
| - - uses: actions/setup-node@v3 |
33 |
| - with: |
34 |
| - node-version-file: '.nvmrc' |
35 |
| - - run: npm ci |
36 |
| - - run: npm run build |
| 10 | + uses: 10up/insecure-content-warning/.github/workflows/build-release-zip.yml@develop |
37 | 11 |
|
38 | 12 | cypress:
|
39 | 13 | needs: build
|
40 | 14 | name: ${{ matrix.core.name }}
|
41 | 15 | runs-on: ubuntu-latest
|
42 | 16 | if: always()
|
| 17 | + |
43 | 18 | strategy:
|
44 | 19 | matrix:
|
45 | 20 | core:
|
46 | 21 | - {name: 'WP latest', version: 'latest'}
|
47 |
| - - {name: 'WP minimum', version: 'WordPress/WordPress#5.8'} |
| 22 | + - {name: 'WP minimum', version: 'WordPress/WordPress#6.4'} |
48 | 23 | - {name: 'WP trunk', version: 'WordPress/WordPress#master'}
|
| 24 | + |
49 | 25 | steps:
|
50 | 26 | - name: Checkout
|
51 |
| - uses: actions/checkout@v3 |
52 |
| - - name: install node |
53 |
| - uses: actions/setup-node@v3 |
| 27 | + uses: actions/checkout@v4 |
| 28 | + |
| 29 | + - name: Download built zip |
| 30 | + uses: actions/download-artifact@v4 |
| 31 | + with: |
| 32 | + name: ${{ github.event.repository.name }} |
| 33 | + path: ${{ github.event.repository.name }} |
| 34 | + |
| 35 | + - name: Display structure of downloaded files |
| 36 | + run: ls -R |
| 37 | + working-directory: ${{ github.event.repository.name }} |
| 38 | + |
| 39 | + - name: Install node |
| 40 | + uses: actions/setup-node@v4 |
54 | 41 | with:
|
55 | 42 | node-version-file: '.nvmrc'
|
56 |
| - - uses: actions/cache@v3 |
| 43 | + |
| 44 | + - uses: actions/cache@v4 |
57 | 45 | id: cache-node
|
58 | 46 | with:
|
59 | 47 | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
60 | 48 | path: |
|
61 | 49 | node_modules
|
62 | 50 | ~/.cache
|
63 | 51 | ~/.npm
|
64 |
| - - uses: actions/cache@v3 |
65 |
| - id: cache-build |
66 |
| - with: |
67 |
| - key: ${{ runner.os }}-build-${{ hashFiles('src/**/*') }} |
68 |
| - path: | |
69 |
| - dist |
70 |
| - languages |
| 52 | +
|
71 | 53 | - run: npm ci
|
72 | 54 | if: ${{ steps.cache-node.outputs.cache-hit != 'true' }}
|
73 |
| - - run: npm run build |
74 |
| - - name: Set the core version |
75 |
| - run: ./tests/bin/set-core-version.js ${{ matrix.core.version }} |
| 55 | + |
| 56 | + - name: Set the core version and plugins config |
| 57 | + run: ./tests/bin/set-wp-config.js --core=${{ matrix.core.version }} --plugins=./${{ github.event.repository.name }},https://downloads.wordpress.org/plugin/classic-editor.zip |
| 58 | + |
76 | 59 | - name: Set up WP environment
|
77 | 60 | run: npm run env:start
|
| 61 | + |
78 | 62 | - name: Test
|
79 | 63 | run: npm run cypress:run
|
| 64 | + |
80 | 65 | - name: Upload artifacts
|
81 |
| - uses: actions/upload-artifact@v3 |
| 66 | + uses: actions/upload-artifact@v4 |
82 | 67 | if: failure()
|
83 | 68 | with:
|
84 | 69 | name: cypress-artifact-insecure-content-warning
|
|
0 commit comments