ref(profiles): Make schema stricter to reflect Rust consumer struct (… #976
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: ci | |
on: | |
push: | |
branches: | |
- main | |
- release/** | |
pull_request: | |
jobs: | |
format: | |
name: "Code formatting" | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Internal github app token | |
id: token | |
uses: getsentry/action-github-app-token@97c9e23528286821f97fba885c1b1123284b29cc # v2.0.0 | |
continue-on-error: true | |
with: | |
app_id: ${{ vars.SENTRY_INTERNAL_APP_ID }} | |
private_key: ${{ secrets.SENTRY_INTERNAL_APP_PRIVATE_KEY }} | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- run: make install format | |
- uses: getsentry/action-github-commit@bec0adb2924f8c19a9f84c18c83d375caf02ca38 # main | |
if: github.event_name == 'pull_request' | |
with: | |
github-token: ${{ steps.token.outputs.token }} | |
- run: git diff --quiet || (echo '::error ::lint produced file changes, run linter locally and try again' && exit 1) | |
lint-rust: | |
name: "Linters (Rust)" | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v2 | |
name: Checkout code | |
- uses: actions/cache@v3 | |
name: Restore build cache | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Run linter | |
run: | | |
make lint-rust | |
lint-python: | |
name: "Linters (Python)" | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v2 | |
name: Checkout code | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
make install | |
- name: Run linter | |
run: | | |
make lint-python | |
typing: | |
name: "Type checking" | |
runs-on: ubuntu-latest | |
timeout-minutes: 2 | |
steps: | |
- uses: actions/checkout@v2 | |
name: Checkout code | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
make install | |
- name: Run mypy | |
run: | | |
make type-checking | |
tests: | |
name: "Run tests" | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python: [3.8, 3.9, "3.10", "3.11"] | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v2 | |
name: Checkout code | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
make install | |
- name: Run tests | |
run: make tests | |
tests-rust: | |
name: "Run tests (Rust)" | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v2 | |
name: Checkout code | |
- uses: actions/cache@v3 | |
name: Restore build cache | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | |
- name: Run tests | |
run: make tests-rust |