123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- name: dev env
- on:
- pull_request:
- paths:
- - '.pre-commit-config.yaml'
- - 'Makefile'
- - '.github/actions/setup-python'
- - '.github/workflows/development-environment.yml'
- - '.envrc'
- - 'Brewfile'
- - 'scripts/*'
- - 'src/sentry/runner/commands/devserver.py'
- - 'src/sentry/runner/commands/devservices.py'
- - 'requirements-*.txt'
- jobs:
- dev-environment:
- name: dev docs set up
- runs-on: ${{ matrix.os }}
- timeout-minutes: 40
- strategy:
- matrix:
- os: [macos-11.0]
- fail-fast: false
- env:
- # Make the environment more similar to what Mac defaults to
- SHELL: /bin/zsh
- steps:
- - name: Checkout sentry
- uses: actions/checkout@v2
- - name: Set variables for caches
- id: info
- run: |
- echo "::set-output name=yarn-cache-dir::$(yarn cache dir)"
- - name: Install prerequisites
- run: |
- make prerequisites
- - name: Setup Python
- uses: ./.github/actions/setup-python
- - name: Cache (pyenv)
- uses: actions/cache@v2
- with:
- path: ~/.pyenv
- key: devenv-${{ matrix.os }}-pyenv-${{ hashFiles('.python-version') }}
- - name: Cache (yarn)
- uses: actions/cache@v1 # We are explicitly using v1 due to perf reasons
- with:
- path: ${{ steps.info.outputs.yarn-cache-dir }}
- key: devenv-${{ matrix.os }}-v1-yarn-${{ hashFiles('yarn.lock') }}
- - name: Set up development environment (mostly as per docs)
- run: |
- curl https://get.volta.sh | bash
- export VOLTA_HOME="$HOME/.volta"
- export PATH="$HOME/.volta/bin:$PATH"
- make setup-pyenv
- [[ $(which python) != "${HOME}/.pyenv/shims/python" ]]
- source ~/.zprofile
- [[ $(which python) == "${HOME}/.pyenv/shims/python" ]]
- [[ $(python -V) == "Python $(cat .python-version)" ]]
- python -m venv .venv
- source .venv/bin/activate
- make develop init-config
- pre-commit
- bootstrap-script:
- runs-on: macos-11
- timeout-minutes: 40
- env:
- # Make the environment more similar to what Mac defaults to
- SHELL: /bin/zsh
- steps:
- - name: Run bootstrap code
- env:
- STRAP_DEBUG: 1
- run: |
- bash <(curl -s https://raw.githubusercontent.com/getsentry/bootstrap-sentry/main/bootstrap.sh)
|