Smokey #220
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: Smokey | |
on: | |
workflow_run: | |
workflows: ["Registry"] | |
branches: [main] | |
types: | |
- completed | |
jobs: | |
build: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: "Cache for sbt & coursier ♨️" | |
uses: coursier/[email protected] | |
- name: "Install Nix ❄️" | |
uses: cachix/install-nix-action@v22 | |
- name: "Install Cachix ❄️" | |
uses: cachix/cachix-action@v12 | |
with: | |
name: feda | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
- name: "Login to GitHub Container Registry " | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: "Pull Docker images from registry 🐳" | |
run: | | |
docker pull ghcr.io/gvolpe/trading-alerts:latest | |
docker pull ghcr.io/gvolpe/trading-processor:latest | |
docker pull ghcr.io/gvolpe/trading-ws:latest | |
docker tag ghcr.io/gvolpe/trading-alerts trading-alerts:latest | |
docker tag ghcr.io/gvolpe/trading-processor trading-processor:latest | |
docker tag ghcr.io/gvolpe/trading-ws trading-ws:latest | |
- name: "Starting up Pulsar & Redis 🐳" | |
run: docker-compose up -d pulsar redis | |
- name: "Starting up trading core services 🐳" | |
run: docker-compose up -d processor alerts ws-server | |
- name: "Run smokey tests 🚀" | |
run: nix develop -c sbt 'smokey/test' | |
- name: "Shutting down containers 🐳" | |
run: docker-compose down |