Skip to content

Commit

Permalink
Final version?
Browse files Browse the repository at this point in the history
  • Loading branch information
ppcano committed Dec 15, 2023
1 parent 6f5429e commit 6e3c0c6
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/k6-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,29 @@ jobs:
sudo apt-get update
sudo apt-get install k6
# The default ACT image does not include Chrome or snapd to install it.
# Chrome does not build for arm64. To run this on Apple Silicon, we need to:
# - Use `--container-architecture linux/amd64` when running ACT
# - Enable the option on Docker Desktop: `Use Rosetta for x86/amd64 emulation on Apple Silicon`
# The default ACT image does not include Chrome or snapd for its installation. Therefore, we need to install Chrome along with ACT.
#
# Note: If you plan to run ACT on Apple Silicon, be aware that Chrome has not yet released an arm64 version. In this case, you should:
# 1. Enable the option on Docker Desktop: `Use Rosetta for x86/amd64 emulation on Apple Silicon`
# 2. Run ACT using the `--container-architecture linux/amd64` flag. For example:
# act -W .github/workflows/k6-tests.yaml --container-architecture linux/amd64
- name: Cache Chrome
if: ${{ env.ACT }}
id: cache-chrome
uses: actions/cache@v3
with:
path: /usr/bin/google-chrome
path: /tmp/google-chrome-stable_current_amd64.deb
key: ${{ runner.os }}-chrome

- name: Set up chrome
if: ${{ (env.ACT) && (steps.cache-chrome.outputs.cache-hit != 'true') }}
- name: Download chrome stable
if: ${{ env.ACT && steps.cache-chrome.outputs.cache-hit != 'true' }}
run: |
sudo apt-get update
wget "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" -P /tmp &&
wget "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" -P /tmp
- name: Install chrome
if: ${{ env.ACT }}
run: |
sudo apt-get update &&
sudo apt-get install -y "/tmp/google-chrome-stable_current_amd64.deb" -f
- name: Run k6 foundations tests
Expand All @@ -61,6 +67,7 @@ jobs:
ACT: ${{ env.ACT }}

- name: Run k6 browser tests
if: false
run: ./run-tests.sh -t **/k6/browser/*.js -u http://localhost:3333
env:
ACT: ${{ env.ACT }}

0 comments on commit 6e3c0c6

Please sign in to comment.