feat: fastly.sdkVersion implementation #72
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: StarlingMonkey | |
concurrency: | |
group: ${{ github.head_ref }}-${{ github.workflow}} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
defaults: | |
run: | |
shell: bash | |
env: | |
viceroy_version: 0.9.4 | |
wasm-tools_version: 1.0.28 | |
fastly-cli_version: 10.4.0 | |
jobs: | |
build: | |
name: StarlingMonkey Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install Rust 1.77.1 | |
run: | | |
rustup toolchain install 1.77.1 | |
rustup target add wasm32-wasi --toolchain 1.77.1 | |
- name: Build | |
run: npm run build:starlingmonkey:debug | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: starling-debug | |
path: starling.wasm | |
sdktest: | |
if: github.ref != 'refs/heads/main' | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Checkout fastly/js-compute-runtime | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
cache: 'yarn' | |
- name: Set up Fastly CLI | |
uses: fastly/compute-actions/setup@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
cli_version: ${{ env.fastly-cli_version }} | |
- name: Restore Viceroy from cache | |
uses: actions/cache@v3 | |
with: | |
path: "/home/runner/.cargo/bin/viceroy" | |
key: crate-cache-viceroy-${{ env.viceroy_version }} | |
- name: Restore wasm-tools from cache | |
uses: actions/cache@v3 | |
id: wasm-tools | |
with: | |
path: "/home/runner/.cargo/bin/wasm-tools" | |
key: crate-cache-wasm-tools-${{ env.wasm-tools_version }} | |
- name: "Check wasm-tools has been restored" | |
if: steps.wasm-tools.outputs.cache-hit != 'true' | |
run: | | |
echo "wasm-tools was not restored from the cache" | |
echo "bailing out from the build early" | |
exit 1 | |
- name: Download Engine | |
uses: actions/download-artifact@v3 | |
with: | |
name: starling-debug | |
- run: yarn install --frozen-lockfile | |
- name: Yarn install | |
run: | | |
yarn | |
cd ./integration-tests/js-compute | |
yarn | |
- run: | | |
cd ./integration-tests/js-compute | |
FASTLY_API_TOKEN=${{ secrets.FASTLY_API_TOKEN }} ./test.js --starlingmonkey --local |