forked from sqlmath/sqlmath
-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (101 loc) · 2.96 KB
/
ci.yml
File metadata and controls
103 lines (101 loc) · 2.96 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# this workflow will run nodejs coverages and tests
# and upload build-artifacts to branch-gh-pages
name: ci
on:
pull_request:
branches:
- alpha
- beta
- master
push:
branches:
- alpha
- beta
- master
workflow_dispatch:
env:
MY_GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
zzzz1234: 1
jobs:
job1:
strategy:
matrix:
architecture:
# - arm64
- x64
# - x86
node_version:
- "24"
os:
- macos-15
- macos-15-intel
- ubuntu-22.04
- windows-2022
python_version:
- "3.12"
# base - .github/workflows/ci.yml - beg
env:
CI_MATRIX_NAME: >
node
v${{ matrix.node_version }}
${{ matrix.architecture }}
${{ matrix.os }}
CI_MATRIX_NAME_MAIN: "node v24 x64 ubuntu-22.04"
CI_MATRIX_NODE_VERSION: ${{ matrix.node_version }}
CI_MATRIX_NODE_VERSION_MAIN: "24"
CI_WORKFLOW_NAME: >
${{ github.workflow }}
- ${{ github.event_name }}
- ${{ github.event.inputs.workflow_dispatch_name }}
- ${{ github.ref_name }}
name: >
node
v${{ matrix.node_version }}
${{ matrix.architecture }}
${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
# disable autocrlf in windows
- run: |
sh -c "uname -a"
echo "$(date -u +"%Y-%m-%d %TZ") - ${{ env.CI_WORKFLOW_NAME }}" # "
git config --global core.autocrlf false
# https://github.com/actions/checkout
- uses: actions/checkout@v5
# https://github.com/actions/cache
- uses: actions/cache@v5
with:
key: >
${{ hashFiles('./package.json') }}
${{ matrix.architecture }}
${{ matrix.node_version }}
${{ matrix.os }}
path: .github_cache/
# fetch jslint_ci.sh from trusted source
- run: |
git fetch origin alpha --depth=1
sh -c 'for FILE in .ci.sh .ci2.sh jslint_ci.sh myci2.sh; do
if [ -f "$FILE" ]; then git checkout origin/alpha "$FILE"; fi; done'
# pre-run .ci.sh
- run: sh jslint_ci.sh shCiPre
if: >
github.event_name == 'push' ||
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch'
# https://github.com/actions/setup-node
- uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node_version }}
# https://github.com/actions/setup-python
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python_version }}
# run nodejs coverages and tests
- run: sh jslint_ci.sh shCiBase
# upload build-artifacts to branch-gh-pages
- run: sh jslint_ci.sh shCiArtifactUpload
if: >
github.event_name == 'push' ||
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch'
# base - .github/workflows/ci.yml - end