Asset Compute smoke test (init, build and deploy) #70
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: Asset Compute smoke test (init, build and deploy) | |
on: | |
workflow_dispatch: | |
schedule: | |
# run daily at midnight | |
- cron: '15 0 * * *' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 1 | |
matrix: | |
node-version: [18.x, 20.x] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Setup Asset Compute | |
uses: actions/checkout@master | |
with: | |
repository: adobe/asset-compute-integration-tests | |
- id: create-asset-compute | |
name: asset compute smoke integration test | |
run: | | |
npm i | |
./node_modules/mocha/bin/mocha test/index.test.js > consoleoutput.txt | |
grep "App initialization finished!" consoleoutput.txt | |
grep -e "Running tests in .*/test/asset-compute/worker" consoleoutput.txt | |
grep "All tests were successful." consoleoutput.txt | |
- id: output | |
name: Write the output to console for debugging | |
if: ${{ failure() }} | |
run: | | |
cat consoleoutput.txt | |
- id: slacknotification | |
name: Slack Notification | |
if: ${{ failure() }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_TITLE: 'Node version' | |
SLACK_MESSAGE: ${{ matrix.node-version }} | |
SLACK_COLOR: ${{ job.status == 'success' && 'good' || job.status == 'cancelled' && '#808080' || 'danger' }} |