Skip to content

Instantly share code, notes, and snippets.

@sjurgis
Created April 25, 2020 02:49
Show Gist options
  • Save sjurgis/d776c25f3182cb947baefdb05ce49391 to your computer and use it in GitHub Desktop.
Save sjurgis/d776c25f3182cb947baefdb05ce49391 to your computer and use it in GitHub Desktop.
name: misc
on: [push]
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install NPM modules
uses: bahmutov/npm-install@v1
with:
useLockFile: true
- name: Install sfdx
uses: sfdx-actions/setup-sfdx@v1
- shell: bash
run: |
cd ci && ./create-org.sh
zip -r ciorg.zip .sfdx
- name: Save org
uses: actions/upload-artifact@v1
with:
name: ciorg
path: ciorg.zip
test:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install NPM modules
uses: bahmutov/npm-install@v1
with:
useLockFile: true
- name: Install sfdx
uses: sfdx-actions/setup-sfdx@v1
- name: Retrieve org
uses: actions/download-artifact@v1
with:
name: ciorg
- shell: bash
run: |
# sfdx force:auth:jwt:grant ...
unzip ciorg/ciorg.zip
sfdx force:org:open -r
- name: Delete org
if: always()
run: sfdx force:org:delete -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment