Skip to content

Commit d00524f

Browse files
Fix fast-fail version
1 parent bd253ec commit d00524f

File tree

1 file changed

+45
-26
lines changed

1 file changed

+45
-26
lines changed

.github/workflows/build.yaml

Lines changed: 45 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,39 @@ jobs:
1313
lint:
1414
name: Lint Python and JavaScript
1515
runs-on: ubuntu-latest
16-
16+
1717
steps:
1818
- name: Checkout code
1919
uses: actions/checkout@v4
20-
20+
2121
- name: Set up Python
2222
uses: actions/setup-python@v5
2323
with:
2424
python-version: '3.11'
25-
25+
2626
- name: Install Python lint dependencies
2727
run: |
2828
python -m pip install --upgrade pip
2929
pip install flake8
30-
30+
3131
- name: Run flake8
3232
run: flake8 api/ db/
33-
33+
3434
- name: Set up Node.js
3535
uses: actions/setup-node@v4
3636
with:
3737
node-version: '20'
38-
38+
3939
- name: Install Prettier
4040
run: npm install --no-save prettier
41-
41+
4242
- name: Run Prettier
4343
run: npx prettier --check app/src/app
4444

4545
apache_deployment:
4646
runs-on: ubuntu-latest
4747
steps:
48-
48+
4949
- name: Checkout
5050
uses: actions/checkout@v4
5151

@@ -63,7 +63,7 @@ jobs:
6363
6464
- name: Make deploy/apache/run.sh executable
6565
run: chmod +x deploy/apache/run.sh
66-
66+
6767
- name: Run the deployment
6868
run: |
6969
cd deploy/apache && sudo ./run.sh
@@ -77,13 +77,23 @@ jobs:
7777
echo "Test App is running"
7878
curl -vf http://localhost:9056
7979
80-
- name: Install cypress-fail-fast plugin
81-
run: npm install --save-dev cypress-fail-fast
80+
- uses: actions/setup-node@v4
81+
with:
82+
node-version: '20'
83+
cache: 'npm'
84+
cache-dependency-path: app/package-lock.json
85+
86+
# Pin cypress-fail-fast here (CI only, --no-save); v7.x matches Cypress 14; v8+ needs Cypress 15+
87+
- name: Install app dependencies and cypress-fail-fast (CI only)
88+
run: |
89+
npm ci
90+
npm install --no-save cypress-fail-fast@7.1.1
8291
working-directory: ./app
8392

8493
- name: Cypress E2E Testing Chrome
8594
uses: cypress-io/github-action@v6
8695
with:
96+
install: false
8797
browser: chrome
8898
working-directory: ./app
8999
spec: 'cypress/**/*.cy.js'
@@ -107,11 +117,11 @@ jobs:
107117
with:
108118
name: apache-error.log
109119
path: /var/log/apache2/error.log
110-
120+
111121
build_and_test:
112122
runs-on: ubuntu-latest
113123
steps:
114-
124+
115125
- name: Checkout
116126
uses: actions/checkout@v4
117127

@@ -128,18 +138,18 @@ jobs:
128138
echo "BASIL_TESTING=1" >> "$GITHUB_ENV"
129139
TEMPDIR=$(mktemp -d)
130140
echo "TEST_RUNS_BASE_DIR=$TEMPDIR" >> $GITHUB_ENV
131-
141+
132142
- name: Install Podman (if needed)
133143
run: |
134144
sudo apt update
135145
sudo apt install -y podman
136146
137147
- name: Install PostgreSQL client tools
138148
run: sudo apt-get update && sudo apt-get install -y postgresql-client
139-
149+
140150
- name: Make run_demo.sh executable
141151
run: chmod +x ./run_demo.sh
142-
152+
143153
- name: Run demo environment
144154
run: |
145155
sudo ./run_demo.sh \
@@ -183,20 +193,20 @@ jobs:
183193
uses: actions/setup-python@v5
184194
with:
185195
python-version: '3.11'
186-
196+
187197
- name: Install python dependencies
188198
run: |
189199
pip install --upgrade pip
190200
pip install -r requirements.txt
191-
192-
- name: API unit testing
201+
202+
- name: API unit testing
193203
run: |
194204
pytest -v ./api/test --cov=api --cov-branch --cov-report=term --cov-report=html
195-
205+
196206
- name: Create tarball of coverage report
197207
run: |
198208
tar -czf api-htmlcov.tar.gz htmlcov
199-
209+
200210
- name: Upload coverage report artifact
201211
uses: actions/upload-artifact@v4
202212
with:
@@ -211,14 +221,23 @@ jobs:
211221
curl -vf http://localhost:$BASIL_API_PORT/apis
212222
curl -vf http://localhost:$BASIL_API_PORT/libraries
213223
curl -vf http://localhost:$BASIL_API_PORT/version
214-
215-
- name: Install cypress-fail-fast plugin
216-
run: npm install --save-dev cypress-fail-fast
224+
225+
- uses: actions/setup-node@v4
226+
with:
227+
node-version: '20'
228+
cache: 'npm'
229+
cache-dependency-path: app/package-lock.json
230+
231+
- name: Install app dependencies and cypress-fail-fast (CI only)
232+
run: |
233+
npm ci
234+
npm install --no-save cypress-fail-fast@7.1.1
217235
working-directory: ./app
218236

219237
- name: Cypress E2E Testing Chrome
220238
uses: cypress-io/github-action@v6
221239
with:
240+
install: false
222241
browser: chrome
223242
working-directory: ./app
224243
spec: 'cypress/**/*.cy.js'
@@ -250,13 +269,13 @@ jobs:
250269
} > "podman-logs/${cname}.log"
251270
done
252271
ls -lh podman-logs
253-
272+
254273
- name: Copy /var/tmp/tmt from basil-api-latest container
255274
if: failure()
256275
run: |
257276
sudo podman cp basil-api-latest:/var/test-runs ./tmt-logs
258277
tar -czf tmt-logs.tar.gz ./tmt-logs
259-
278+
260279
- name: Upload tmt logs as artifact
261280
uses: actions/upload-artifact@v4
262281
if: failure()

0 commit comments

Comments
 (0)