Skip to content

Commit

Permalink
Merge pull request #7 from fermyon/prepare-release
Browse files Browse the repository at this point in the history
prepare for v1.0.0 release
  • Loading branch information
rajatjindal authored Mar 17, 2023
2 parents e0437b0 + 627e5c6 commit c866aac
Show file tree
Hide file tree
Showing 32 changed files with 67,413 additions and 180 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/e2e-spin-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: deploy spin app e2e tests
on:
pull_request:
branches: [main]

push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'fermyon' }}
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 19

- name: npm install
run: npm install

- name: npm run build
run: npm run package
env:
NODE_OPTIONS: --openssl-legacy-provider

- name: upload artifact
uses: actions/upload-artifact@v3
with:
name: spin-actions
path: dist/spin/deploy/index.js

deploy-fermyon-cloud:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Retrieve saved Github action
uses: actions/download-artifact@v3
with:
name: spin-actions
path: dist/spin/deploy/

- name: setup spin
uses: ./spin/setup/
with:
version: canary
plugins: js2wasm
github_token: ${{ github.token }}

- name: build and deploy
uses: ./spin/deploy/
with:
fermyon_token: ${{ secrets.FERMYON_CLOUD_TOKEN }}
manifest_file: example-app/spin.toml
121 changes: 121 additions & 0 deletions .github/workflows/e2e-spin-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: build-and-push e2e tests
on:
pull_request:
branches: [main]

push:
branches: [main]

env:
REGISTRY: ghcr.io
REPOSITORY: ${{ github.repository }}
SAMPLE_APP_IMAGE_NAME: actions-e2e-test

jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'fermyon' }}
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 19

- name: npm install
run: npm install

- name: npm run build
run: npm run package
env:
NODE_OPTIONS: --openssl-legacy-provider

- name: upload artifact
uses: actions/upload-artifact@v3
with:
name: spin-actions
path: dist/spin/push/index.js

push-ghcr-io:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Retrieve saved Github action
uses: actions/download-artifact@v3
with:
name: spin-actions
path: dist/spin/push/

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: setup spin
uses: ./spin/setup/
with:
version: v0.10.1
plugins: js2wasm
github_token: ${{ github.token }}

- name: build and push
uses: ./spin/push/
with:
registry_reference: "${{ env.REGISTRY }}/${{ env.REPOSITORY }}/${{ env.SAMPLE_APP_IMAGE_NAME }}:${{ github.run_id }}"
manifest_file: example-app/spin.toml

- name: verify app was pushed to OCI Registry
run: spin registry pull "${{ env.REGISTRY }}/${{ env.REPOSITORY }}/${{ env.SAMPLE_APP_IMAGE_NAME }}:${{ github.run_id }}"

- uses: bots-house/[email protected]
if: always()
with:
owner: fermyon
## name: 'actions/actions-e2e-tests'
name: "${{ github.event.repository.name }}/${{ env.SAMPLE_APP_IMAGE_NAME }}"
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.run_id }}

spin-registry-login:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Retrieve saved Github action
uses: actions/download-artifact@v3
with:
name: spin-actions
path: dist/spin/push/

- name: setup spin
uses: ./spin/setup/
with:
version: canary
plugins: js2wasm
github_token: ${{ github.token }}

- name: build and push
uses: ./spin/push/
with:
registry: ${{ env.REGISTRY }}
registry_username: ${{ github.actor }}
registry_password: ${{ secrets.GITHUB_TOKEN }}
registry_reference: "${{ env.REGISTRY }}/${{ env.REPOSITORY }}/${{ env.SAMPLE_APP_IMAGE_NAME }}:${{ github.run_id }}-2"
manifest_file: example-app/spin.toml

- name: verify app was pushed to OCI Registry
run: spin registry pull "${{ env.REGISTRY }}/${{ env.REPOSITORY }}/${{ env.SAMPLE_APP_IMAGE_NAME }}:${{ github.run_id }}-2"

- uses: bots-house/[email protected]
if: always()
with:
owner: fermyon
## name: 'actions/actions-e2e-tests'
name: "${{ github.event.repository.name }}/${{ env.SAMPLE_APP_IMAGE_NAME }}"
token: ${{ secrets.GITHUB_TOKEN }}
tag: "${{ github.run_id }}-2"
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: setup-spin
path: dist/index.js
path: dist/spin/setup/index.js

setup-default-spin:
needs: build
runs-on: ${{ matrix.os }}
if: ${{ github.repository_owner == 'fermyon' }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand All @@ -43,17 +44,20 @@ jobs:
uses: actions/download-artifact@v3
with:
name: setup-spin
path: dist
path: dist/spin/setup/

- name: setup spin
uses: ./
uses: ./spin/setup/
with:
github_token: ${{ github.token }}

- name: verify spin setup
run: spin --version

setup-specific-spin-version:
needs: build
runs-on: ${{ matrix.os }}
if: ${{ github.repository_owner == 'fermyon' }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand All @@ -64,12 +68,13 @@ jobs:
uses: actions/download-artifact@v3
with:
name: setup-spin
path: dist
path: dist/spin/setup/

- name: setup spin
uses: ./
uses: ./spin/setup/
with:
version: v0.9.0
github_token: ${{ github.token }}

- name: spin setup successful
if: ${{ contains(env.SPIN_VERSION, '0.9.0') }}
Expand All @@ -84,6 +89,7 @@ jobs:
setup-spin-and-one-plugin:
needs: build
runs-on: ${{ matrix.os }}
if: ${{ github.repository_owner == 'fermyon' }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand All @@ -94,20 +100,22 @@ jobs:
uses: actions/download-artifact@v3
with:
name: setup-spin
path: dist
path: dist/spin/setup/

- name: setup spin
uses: ./
uses: ./spin/setup/
with:
version: v0.10.0
plugins: js2wasm
github_token: ${{ github.token }}

- name: verify js2wasm is installed
run: spin js2wasm --version 2>ignore

setup-spin-and-mulitple-plugins:
setup-spin-and-multiple-plugins:
needs: build
runs-on: ${{ matrix.os }}
if: ${{ github.repository_owner == 'fermyon' }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand All @@ -118,13 +126,14 @@ jobs:
uses: actions/download-artifact@v3
with:
name: setup-spin
path: dist
path: dist/spin/setup/

- name: setup spin
uses: ./
uses: ./spin/setup/
with:
version: v0.10.0
plugins: js2wasm,py2wasm
github_token: ${{ github.token }}

- name: verify js2wasm is installed
run: spin js2wasm --version 2>ignore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:

- uses: JasonEtco/build-and-tag-action@v2
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_FOR_RELEASE }}
GITHUB_TOKEN: ${{ github.token }}
Loading

0 comments on commit c866aac

Please sign in to comment.