-
Notifications
You must be signed in to change notification settings - Fork 214
56 lines (53 loc) · 1.81 KB
/
Copy pathnext-drupal.yml
File metadata and controls
56 lines (53 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: next-drupal
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.19.x'
- name: Install packages
run: yarn install --frozen-lockfile
- name: Run unit tests (PR)
if: github.event_name == 'pull_request'
# Skip integration test files that exercise a live Drupal instance.
# Tracking removal of the live dependency in .claude/plans/.
run: |
yarn workspace next-drupal test \
--testPathIgnorePatterns="NextDrupal/(crud-methods|resource-methods|basic-methods)|NextDrupalPages/(resource-methods|pages-router-methods)" \
--coverageThreshold='{}'
env:
# Placeholders only — unit tests mock fetch. The test utils
# construct a Drupal client at module load and require these
# to be present (not valid).
DRUPAL_BASE_URL: http://localhost
DRUPAL_USERNAME: test
DRUPAL_PASSWORD: test
DRUPAL_CLIENT_ID: test
DRUPAL_CLIENT_SECRET: test
- name: Run all tests (main)
if: github.event_name == 'push'
run: yarn workspace next-drupal test
env:
DRUPAL_BASE_URL: ${{ secrets.DRUPAL_BASE_URL }}
DRUPAL_USERNAME: ${{ secrets.DRUPAL_USERNAME }}
DRUPAL_PASSWORD: ${{ secrets.DRUPAL_PASSWORD }}
DRUPAL_CLIENT_ID: ${{ secrets.DRUPAL_CLIENT_ID }}
DRUPAL_CLIENT_SECRET: ${{ secrets.DRUPAL_CLIENT_SECRET }}