fix dockerfile #82
This file contains hidden or 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: Elixir CI | |
| on: push | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Set up Docker Compose | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y docker-compose | |
| - name: Build Docker image | |
| run: docker build --build-arg MIX_ENV=test --tag code_comparison:latest . | |
| - name: Start | |
| run: docker-compose -f docker-compose-ci.yml run -d -e MIX_ENV=test -v /code_comparison/deps -v /code_comparison/_build --name web web /bin/sh | |
| - name: Deps | |
| run: docker exec web mix deps.get | |
| - name: Format | |
| run: docker exec web mix format --check-formatted | |
| - name: Test | |
| run: docker exec web mix test | |
| deploy: | |
| needs: test | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| ref: main | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.8.1 | |
| - uses: mhanberg/gigalixir-action@v0.4.0 | |
| with: | |
| GIGALIXIR_APP: ${{ secrets.GIGALIXIR_APPNAME }} | |
| GIGALIXIR_CLEAN: true | |
| GIGALIXIR_USERNAME: ${{ secrets.GIGALIXIR_USERNAME }} | |
| GIGALIXIR_PASSWORD: ${{ secrets.GIGALIXIR_PASSWORD }} | |
| MIGRATIONS: false | |
| SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} |