change frontend workdir and axios version #16
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: arenas-build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: '${{ matrix.os }}' | |
strategy: | |
matrix: | |
os: | |
- ubuntu-20.04 | |
python-version: | |
- 3.7.17 | |
env: | |
TRAVIS_PULL_REQUEST: ${{ vars.TRAVIS_PULL_REQUEST }} | |
TRAVIS_BRANCH: ${{ vars.TRAVIS_BRANCH }} | |
DEPLOY_FLAG: ${{ vars.DEPLOY_FLAG }} | |
PRODUCTION_INSTANCE: ${{ secrets.PRODUCTION_INSTANCE }} | |
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
steps: | |
- name: 'Set up Python ${{ matrix.python-version }}' | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '${{ matrix.python-version }}' | |
- run: rm -f $HOME/.cache/pip/log/debug.log | |
- name: Cache multiple paths | |
uses: actions/cache@v2 | |
with: | |
path: $HOME/.cache/pip | |
key: '${{ runner.os }}-${{ hashFiles(''TODO'') }}' | |
- uses: actions/checkout@v2 | |
- run: sudo rm -f /etc/boto.cfg | |
- run: export CHROME_BIN=chromium-browser | |
- run: export DISPLAY=:99.0 | |
- run: pip install awscli==1.18.66 importlib-metadata==4.8.3 flake8==3.8.4 coveralls==3.3.1 | |
- run: flake8 ./ || exit 1; | |
# - run: >- | |
# if [ $TRAVIS_PULL_REQUEST = false ]; then echo $DOCKER_PASSWORD | |
# | docker login --username $DOCKER_USERNAME --password-stdin || | |
# exit 1; fi | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | |
- name: Login to ECR | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ secrets.AWS_REGISTRY }} | |
- run: docker-compose build || exit 1; | |
- run: docker-compose run -e DJANGO_SETTINGS_MODULE=settings.test django pytest --cov . --cov-config .coveragerc || exit 1; | |
- run: 'bash <(curl -s https://codecov.io/bash)' | |
- run: coveralls --rcfile=.coveragerc | |
- run: eval "$(ssh-agent -s)" | |
- run: openssl enc -d -aes-256-cbc -K ${{ secrets.ENCRYPTED_KEY }} -iv ${{ secrets.ENCRYPTED_IV }} -in scripts/deployment/evalai.pem.enc -out scripts/deployment/evalai.pem || true | |
- run: ./scripts/deployment/push.sh | |
- run: ./scripts/deployment/deploy.sh ${{ vars.DEPLOY_FLAG }} |