Allow cerberus to skip regular token use via nuid in header in conjun… #55
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: Build-Test | |
| on: | |
| push: | |
| branches: [ "develop" ] | |
| pull_request: | |
| branches: [ "develop" ] | |
| env: | |
| RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} | |
| jobs: | |
| build_and_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Github Action cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/caches | |
| key: ${{ runner.os }}-${{ hashFiles('Gemfile.lock') }} | |
| - name: Load Docker image | |
| run: | | |
| set +o pipefail | |
| docker load -i ~/caches/atlas.tar | true | |
| - name: Build the Docker image | |
| run: docker build --cache-from=nakatomi/atlas_web:latest . --file Dockerfile --tag nakatomi/atlas_web:latest --tag nakatomi/atlas_web:$(cat .version) | |
| - name: Save Docker image | |
| run: | | |
| mkdir -p ~/caches | |
| docker save -o ~/caches/atlas.tar nakatomi/atlas_web | |
| - name: Setup dockerize | |
| uses: zcong1993/setup-dockerize@v2.0.0 | |
| - name: Start server | |
| run: | | |
| set -x | |
| docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d | |
| - name: Wait until available | |
| run: dockerize -wait http://localhost:3000 -timeout 1m | |
| - uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| - name: Push the Docker image | |
| run: | | |
| docker push nakatomi/atlas_web:$(cat .version) | |
| - name: Run tests | |
| run: | | |
| docker compose exec -T web bundle exec rake |