1- name : stoplightio/prism/build
1+ name : Build
22on :
33 push :
4- branches :
5- - master
4+ branches : [master]
5+ pull_request :
6+ types : [opened, synchronize, reopened, edited]
67jobs :
78 build :
89 runs-on : ubuntu-latest
9- container :
10- image : node:18.20
1110 steps :
12- - uses : actions/checkout@v4.1.0
11+ - uses : actions/checkout@v6
12+ - uses : actions/setup-node@v6
13+ with :
14+ node-version-file : .nvmrc
15+ cache : ' yarn'
1316 - name : restore_cache
14- uses : actions/cache@v3.3.2
17+ uses : actions/cache@v5
1518 with :
16- key : yarn-packages-{{ .Branch }}-{{ checksum " yarn.lock" }}
19+ key : yarn-packages-$ {{ github.ref_name }}-$ {{ hashFiles(' yarn.lock') }}
1720 path : node_modules/
18- restore-keys : yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
21+ restore-keys : yarn-packages-$ {{ github.ref_name }}-
1922 - name : Install Dependencies
2023 run : yarn --frozen-lockfile
2124 - name : Lint the codebase
@@ -25,27 +28,48 @@ jobs:
2528 - name : Run build
2629 run : yarn build
2730 harness-macos :
28- if : (github.ref == 'refs/tags/"v[0-9].[0-9]+.[0-9]+"') && (github.ref != 'refs/heads/master')
2931 runs-on : macos-latest
3032 env :
3133 executor : macos
3234 install_manually : true
3335 steps :
34- - uses : maxim-lobanov/setup-xcode@v1.6 .0
36+ - uses : maxim-lobanov/setup-xcode@v1.7 .0
3537 with :
36- xcode-version : 13.4.1
37- - uses : actions/checkout@v4.1.0
38- - run : nvm install 18.20.1 && nvm alias default 18.20.1
39- if : env.install_manually
40- - run : pip3 install pipenv gunicorn
38+ xcode-version : latest-stable
39+ - uses : actions/checkout@v6
40+ - uses : actions/setup-node@v6
41+ with :
42+ node-version-file : .nvmrc
43+ cache : ' yarn'
44+ - uses : actions/setup-python@v5
45+ with :
46+ python-version : ' 3.12'
47+ - name : Set up Python virtual environment
48+ run : |
49+ python3 -m venv venv
50+ . venv/bin/activate
51+ pip install --upgrade pip
52+ pip install pipenv gunicorn
53+ pipenv --version # Verify pipenv is installed
54+ gunicorn --version # Verify gunicorn is installed
4155 if : env.install_manually
4256 - run : sudo bash -c 'echo "0.0.0.0 httpbin.org" >> /etc/hosts'
4357 if : env.install_manually
4458 - run : git clone https://github.com/stoplightio/httpbin httpbin
4559 if : env.install_manually
46- - run : cd httpbin && pip3 install --no-cache-dir -r <(pipenv requirements) && pip3 install --no-cache-dir ./
60+ - run : |
61+ cd httpbin
62+ . ../venv/bin/activate
63+ pipenv requirements > requirements.txt
64+ pip install --no-cache-dir -r requirements.txt
65+ pip install --no-cache-dir ./
4766 if: env.install_manually
48- - run : cd httpbin && gunicorn -b 0.0.0.0:80 httpbin:app -k gevent
67+ - run : |
68+ cd httpbin
69+ . ../venv/bin/activate
70+ gunicorn -b 0.0.0.0:80 httpbin:app -k gevent &
71+ sleep 15
72+ curl -I http://0.0.0.0:80
4973 if: env.install_manually
5074 - name : Install Dependencies
5175 run : yarn --frozen-lockfile
@@ -55,24 +79,45 @@ jobs:
5579 run : yarn test.harness
5680 harness-docker :
5781 runs-on : ubuntu-latest
58- container :
59- image : node:18.20
6082 env :
6183 executor : docker-harness
6284 install_manually : true
6385 steps :
64- - uses : actions/checkout@v4.1.0
65- - run : nvm install 18.20.1 && nvm alias default 18.20.1
66- if : env.install_manually
67- - run : pip3 install pipenv gunicorn
86+ - uses : actions/checkout@v6
87+ - uses : actions/setup-node@v6
88+ with :
89+ node-version-file : .nvmrc
90+ cache : ' yarn'
91+ - name : Install Python and required packages
92+ run : |
93+ sudo apt-get update
94+ sudo apt-get install -y python3 python3-pip python3-venv
95+ - name : Set up Python virtual environment
96+ run : |
97+ python3 -m venv venv
98+ . venv/bin/activate
99+ pip install --upgrade pip
100+ pip install pipenv gunicorn
101+ pipenv --version # Verify pipenv is installed
102+ gunicorn --version # Verify gunicorn is installed
68103 if : env.install_manually
69104 - run : sudo bash -c 'echo "0.0.0.0 httpbin.org" >> /etc/hosts'
70105 if : env.install_manually
71- - run : git clone REDACTED ://github.com/stoplightio/httpbin httpbin
106+ - run : git clone https ://github.com/stoplightio/httpbin httpbin
72107 if : env.install_manually
73- - run : cd httpbin && pip3 install --no-cache-dir -r <(pipenv requirements) && pip3 install --no-cache-dir ./
108+ - run : |
109+ cd httpbin
110+ . ../venv/bin/activate
111+ pipenv requirements > requirements.txt
112+ pip3 install --no-cache-dir -r requirements.txt
113+ pip3 install --no-cache-dir ./
74114 if: env.install_manually
75- - run : cd httpbin && gunicorn -b 0.0.0.0:80 httpbin:app -k gevent
115+ - run : |
116+ cd httpbin
117+ . ../venv/bin/activate
118+ sudo $(which gunicorn) -b 0.0.0.0:80 httpbin:app -k gevent &
119+ sleep 15
120+ curl -I http://0.0.0.0:80
76121 if: env.install_manually
77122 - name : Install Dependencies
78123 run : yarn --frozen-lockfile
@@ -81,16 +126,18 @@ jobs:
81126 - name : Run Harness
82127 run : yarn test.harness
83128 publish :
84- if : (github.ref == 'refs/tags/"v[0-9].[0-9]+.[0-9]+" ') && ( github.ref != 'refs/heads/master')
129+ if : startsWith (github.ref, 'refs/tags/v ') && github.ref != 'refs/heads/master'
85130 runs-on : ubuntu-latest
86- container :
87- image : node:18.20
88131 needs :
89132 - build
90133 - harness-macos
91134 - harness-docker
92135 steps :
93- - uses : actions/checkout@v4.1.0
136+ - uses : actions/checkout@v6
137+ - uses : actions/setup-node@v6
138+ with :
139+ node-version-file : .nvmrc
140+ cache : ' yarn'
94141 - name : Set git identity
95142 run : git config user.email "circle@circleci.com" && git config user.name "circleci"
96143 - name : Install Dependencies
@@ -101,22 +148,19 @@ jobs:
101148 - name : Publish
102149 run : yarn lerna publish from-git --create-release=github --yes
103150 - name : Create CLI binaries
104- run : npx pkg --out-path ./cli-binaries ./packages/cli/
105- - uses : actions/upload-artifact@v4.1.0
151+ run : npx @yao- pkg/pkg --out-path ./cli-binaries --options max_old_space_size=4096 ./packages/cli/
152+ - uses : actions/upload-artifact@v7
106153 with :
107154 path : " ./cli-binaries"
108- - uses : actions/upload-artifact@v4.1.0
109- with :
110- path : " .//cli-binaries"
111155 upload_artifacts :
112- if : (github.ref == 'refs/tags/"v[0-9].[0-9]+.[0-9]+" ') && ( github.ref != 'refs/heads/master')
156+ if : startsWith (github.ref, 'refs/tags/v ') && github.ref != 'refs/heads/master'
113157 runs-on : ubuntu-latest
114158 container :
115159 image : golang:1.23
116160 needs :
117161 - publish
118162 steps :
119- - uses : actions/download-artifact@v4.1.3
163+ - uses : actions/download-artifact@v8
120164 with :
121165 path : " /tmp/"
122166 - name : Download GitHub Release Utility
0 commit comments