Skip to content

feat: add getting started for SQS triggers #11

feat: add getting started for SQS triggers

feat: add getting started for SQS triggers #11

---
name: trigger-functions-offline-testing
# The tests themselves are written with osht, a bash testing framework.
# See: https://github.com/coryb/osht
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
TRIGGERS_GETTING_STARTED_FOLDER: functions/triggers-getting-started
OFFLINE_SERVER_URL: http://localhost:8080
jobs:
triggers-node:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install node dev requirements
run: |
cd ${{ env.TRIGGERS_GETTING_STARTED_FOLDER }}/node
npm install
- name: Install python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install python dev requirements
run: pip install -r ${{ env.TRIGGERS_GETTING_STARTED_FOLDER }}/tests/requirements.txt
- name: Run node offline testing
uses: BerniWittmann/background-server-action@v1
with:
command: python ${{ env.TRIGGERS_GETTING_STARTED_FOLDER }}/tests/test_handler.py
start: npm start --prefix ${{ env.TRIGGERS_GETTING_STARTED_FOLDER }}/node