Skip to content

Add GitHub action to run tests on every commit to main and pull requests #10

Add GitHub action to run tests on every commit to main and pull requests

Add GitHub action to run tests on every commit to main and pull requests #10

Workflow file for this run

name: Run Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Run docker-compose
run: docker compose -f docker/docker-compose.yml up -d
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Create DynamoDB table
run: |
aws dynamodb create-table \
--table-name clients \
--attribute-definitions AttributeName=clientId,AttributeType=S \
--key-schema AttributeName=clientId,KeyType=HASH \
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \
--endpoint-url http://localhost:8000
- name: Run tests
run: task test