diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..857cca7ef3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: CI Pipeline - Vote and Worker Services + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + + - name: Checkout Repositories + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install Dependencies (vote) + working-directory: vote + run: npm install + + - name: Run Tests (vote) + working-directory: vote + run: npm test --if-present + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install Python Deps (worker) + working-directory: worker + run: pip install -r requirements.txt + + - name: Run Python tests (worker) + working-directory: worker + run: pytest || echo "No tests found" diff --git a/README.md b/README.md index 8516424ba1..0d63fc0b03 100644 --- a/README.md +++ b/README.md @@ -63,3 +63,5 @@ The voting application only accepts one vote per client browser. It does not reg This isn't an example of a properly architected perfectly designed distributed app... it's just a simple example of the various types of pieces and languages you might see (queues, persistent data, etc), and how to deal with them in Docker at a basic level. + +