feat: release v5.0.0 #26
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
# Unique name for this workflow | |
name: CI on PR | |
# Definition when the workflow should run | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, edited, synchronize, reopened] | |
# Jobs to be executed | |
jobs: | |
format-lint-test: | |
runs-on: ubuntu-latest | |
env: | |
SALESFORCE_LOGIN_URL: ${{ secrets.SALESFORCE_LOGIN_URL }} | |
SALESFORCE_USERNAME: ${{ secrets.SALESFORCE_USERNAME }} | |
SALESFORCE_PASSWORD: ${{ secrets.SALESFORCE_PASSWORD }} | |
SALESFORCE_TOKEN: ${{ secrets.SALESFORCE_TOKEN }} | |
SALESFORCE_CLIENT_ID: ${{ secrets.SALESFORCE_CLIENT_ID }} | |
SALESFORCE_CLIENT_SECRET: ${{ secrets.SALESFORCE_CLIENT_SECRET }} | |
SALESFORCE_JWT_LOGIN_URL: ${{ secrets.SALESFORCE_JWT_LOGIN_URL }} | |
SALESFORCE_JWT_CLIENT_ID: ${{ secrets.SALESFORCE_JWT_CLIENT_ID }} | |
SALESFORCE_PRIVATE_KEY: ${{ secrets.SALESFORCE_PRIVATE_KEY }} | |
steps: | |
# Checkout the source code | |
- name: 'Checkout source code' | |
uses: actions/checkout@v4 | |
# Install Volta to enforce proper node and package manager versions | |
- name: 'Install Volta' | |
uses: volta-cli/action@v4 | |
# Cache node_modules to speed up the process | |
- name: 'Restore node_modules cache' | |
id: cache-npm | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: npm-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
npm-${{ env.cache-name }}- | |
npm- | |
# Install npm dependencies | |
- name: 'Install npm dependencies' | |
if: steps.cache-npm.outputs.cache-hit != 'true' | |
run: HUSKY=0 npm ci | |
# Format | |
- name: 'Format' | |
run: npm run format:verify | |
# Lint | |
- name: 'Lint' | |
run: npm run lint | |
# Configure test env | |
- name: 'Configure test environment' | |
run: | | |
touch .env | |
echo SALESFORCE_LOGIN_URL=$SALESFORCE_LOGIN_URL >> .env | |
echo SALESFORCE_USERNAME=$SALESFORCE_USERNAME >> .env | |
echo SALESFORCE_PASSWORD=$SALESFORCE_PASSWORD >> .env | |
echo SALESFORCE_TOKEN=$SALESFORCE_TOKEN >> .env | |
echo SALESFORCE_CLIENT_ID=$SALESFORCE_CLIENT_ID >> .env | |
echo SALESFORCE_CLIENT_SECRET=$SALESFORCE_CLIENT_SECRET >> .env | |
echo SALESFORCE_PRIVATE_KEY_PATH=server.key >> .env | |
echo SALESFORCE_JWT_LOGIN_URL=$SALESFORCE_JWT_LOGIN_URL >> .env | |
echo SALESFORCE_JWT_CLIENT_ID=$SALESFORCE_JWT_CLIENT_ID >> .env | |
echo "$SALESFORCE_PRIVATE_KEY" > server.key | |
# Integration tests | |
- name: 'Integration tests' | |
run: npm run test | |
# Housekeeping | |
- name: 'Delete test environment configuration' | |
if: always() | |
run: rm -f .env server.key |