Skip to content

Commit 0ec255f

Browse files
fix(ci): fix build workflow (#2736)
1 parent 8980465 commit 0ec255f

File tree

7 files changed

+78
-113
lines changed

7 files changed

+78
-113
lines changed

.github/workflows/auto-approve.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- name: Dependabot metadata
1717
id: metadata
18-
uses: dependabot/fetch-metadata@v1.1.1
18+
uses: dependabot/fetch-metadata@v3.0.0
1919
with:
2020
github-token: '${{ secrets.GITHUB_TOKEN }}'
2121
- name: Approve a PR

.github/workflows/auto-merge-dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- name: Dependabot metadata
1717
id: metadata
18-
uses: dependabot/fetch-metadata@v1.1.1
18+
uses: dependabot/fetch-metadata@v3.0.0
1919
with:
2020
github-token: '${{ secrets.GITHUB_TOKEN }}'
2121
- name: Enable auto-merge for Dependabot PRs

.github/workflows/build.yml

Lines changed: 73 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,23 @@ name: Build
22
on:
33
push:
44
branches: [master]
5+
pull_request:
6+
types: [opened, synchronize, reopened, edited]
57
jobs:
68
build:
79
runs-on: ubuntu-latest
8-
container:
9-
image: node:24.14
1010
steps:
11-
- 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'
1216
- name: restore_cache
13-
uses: actions/cache@v4.3.0
17+
uses: actions/cache@v5
1418
with:
15-
key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
19+
key: yarn-packages-${{ github.ref_name }}-${{ hashFiles('yarn.lock') }}
1620
path: node_modules/
17-
restore-keys: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }}
21+
restore-keys: yarn-packages-${{ github.ref_name }}-
1822
- name: Install Dependencies
1923
run: yarn --frozen-lockfile
2024
- name: Lint the codebase
@@ -24,29 +28,48 @@ jobs:
2428
- name: Run build
2529
run: yarn build
2630
harness-macos:
27-
if: startsWith(github.ref, 'refs/tags/v') && github.ref != 'refs/heads/master'
2831
runs-on: macos-latest
2932
env:
3033
executor: macos
3134
install_manually: true
3235
steps:
33-
- uses: maxim-lobanov/setup-xcode@v1.6.0
36+
- uses: maxim-lobanov/setup-xcode@v1.7.0
3437
with:
35-
xcode-version: 13.4.1
36-
- uses: actions/checkout@v4.1.0
38+
xcode-version: latest-stable
39+
- uses: actions/checkout@v6
3740
- uses: actions/setup-node@v6
3841
with:
3942
node-version-file: .nvmrc
4043
cache: 'yarn'
41-
- run: pip3 install pipenv gunicorn
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
4255
if: env.install_manually
4356
- run: sudo bash -c 'echo "0.0.0.0 httpbin.org" >> /etc/hosts'
4457
if: env.install_manually
4558
- run: git clone https://github.com/stoplightio/httpbin httpbin
4659
if: env.install_manually
47-
- 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 ./
4866
if: env.install_manually
49-
- 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
5073
if: env.install_manually
5174
- name: Install Dependencies
5275
run: yarn --frozen-lockfile
@@ -56,22 +79,45 @@ jobs:
5679
run: yarn test.harness
5780
harness-docker:
5881
runs-on: ubuntu-latest
59-
container:
60-
image: node:24.14
6182
env:
6283
executor: docker-harness
6384
install_manually: true
6485
steps:
65-
- uses: actions/checkout@v4.1.0
66-
- 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
67103
if: env.install_manually
68104
- run: sudo bash -c 'echo "0.0.0.0 httpbin.org" >> /etc/hosts'
69105
if: env.install_manually
70-
- run: git clone REDACTED://github.com/stoplightio/httpbin httpbin
106+
- run: git clone https://github.com/stoplightio/httpbin httpbin
71107
if: env.install_manually
72-
- 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 ./
73114
if: env.install_manually
74-
- 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
75121
if: env.install_manually
76122
- name: Install Dependencies
77123
run: yarn --frozen-lockfile
@@ -82,14 +128,16 @@ jobs:
82128
publish:
83129
if: startsWith(github.ref, 'refs/tags/v') && github.ref != 'refs/heads/master'
84130
runs-on: ubuntu-latest
85-
container:
86-
image: node:24.14
87131
needs:
88132
- build
89133
- harness-macos
90134
- harness-docker
91135
steps:
92-
- 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'
93141
- name: Set git identity
94142
run: git config user.email "circle@circleci.com" && git config user.name "circleci"
95143
- name: Install Dependencies
@@ -101,7 +149,7 @@ jobs:
101149
run: yarn lerna publish from-git --create-release=github --yes
102150
- name: Create CLI binaries
103151
run: npx @yao-pkg/pkg --out-path ./cli-binaries --options max_old_space_size=4096 ./packages/cli/
104-
- uses: actions/upload-artifact@v4.1.0
152+
- uses: actions/upload-artifact@v7
105153
with:
106154
path: "./cli-binaries"
107155
upload_artifacts:
@@ -112,7 +160,7 @@ jobs:
112160
needs:
113161
- publish
114162
steps:
115-
- uses: actions/download-artifact@v4.1.3
163+
- uses: actions/download-artifact@v8
116164
with:
117165
path: "/tmp/"
118166
- name: Download GitHub Release Utility

.github/workflows/build_pr.yml

Lines changed: 0 additions & 83 deletions
This file was deleted.

.github/workflows/markdown-links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
markdown-link-check:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@master
12+
- uses: actions/checkout@v6
1313
with:
1414
fetch-depth: 1
1515
- uses: gaurav-nelson/github-action-markdown-link-check@v1

.github/workflows/pr-title.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414
main:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: amannn/action-semantic-pull-request@v5
17+
- uses: amannn/action-semantic-pull-request@v6
1818
env:
1919
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
tag_name: ${{ steps.release.outputs.tag_name }}
2020
steps:
2121
- name: Checkout Repository
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323
with:
2424
fetch-depth: 0
2525

0 commit comments

Comments
 (0)