forked from oraoto/pib
-
-
Notifications
You must be signed in to change notification settings - Fork 83
72 lines (61 loc) · 2.18 KB
/
Copy pathtest-cgi-node-step.yaml
File metadata and controls
72 lines (61 loc) · 2.18 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Test CGI Node
on:
workflow_call:
inputs:
phpVersion:
required: true
type: string
libType:
required: true
type: string
artifactPattern:
required: true
type: string
jobs:
test:
name: Test Cgi Node ${{ inputs.phpVersion }} w/${{ inputs.libType }} libs
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v6
- name: Disable man-db auto-update
run: |
echo "set man-db/auto-update false" | sudo debconf-communicate
sudo dpkg-reconfigure man-db
- name: Import configuration
run: |
cp -p .github/.env_${{ inputs.phpVersion }}.${{ inputs.libType }}.ci .env
touch -d '1970-01-01 00:00:00 UTC' .env
- name: Download Artifact
uses: actions/download-artifact@v8
with:
pattern: ${{ inputs.artifactPattern }}
merge-multiple: true
path: ./
- name: Extract Artifact
run: |
for TAR in ${{ inputs.artifactPattern }}.tar.gz; do
tar -xzf ${TAR}
done;
- name: Flatten mtimes after extraction
run: find . \( -name node_modules -o -name .git \) -type d -prune -o -type f -print0 | xargs -0 touch -d '1970-01-01 00:00:00 UTC'
- name: Install NPM packages
run: |
npm ci
- name: Run tests
run: |
PHP_VERSION=${{ inputs.phpVersion }} LIB_TYPE=${{ inputs.libType }} make --debug=basic test-cgi-node
PHP_VERSION=${{ inputs.phpVersion }} LIB_TYPE=${{ inputs.libType }} make --debug=basic test-cgi-node-cjs
- name: Take Failure Snapshot
if: ${{ failure() }}
run: |
sudo chown -R ${USER}:${USER} .
sudo chmod -R u+rwX,go+rX .
tar --exclude=.git --exclude='snapshot.tar.gz' --ignore-failed-read --warning=no-file-changed -czf snapshot.tar.gz .
- name: Upload Failure Artifact
uses: actions/upload-artifact@v6
if: ${{ failure() }}
with:
name: failure-snapshot-cgi-node-test-${{ inputs.phpVersion }}-${{ inputs.libType }}
path: snapshot.tar.gz
compression-level: 0