docs: rewrite README and documentation with a cleaner structure. #26
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: '42 3 22 * *' | |
| - cron: '13 1 14 * *' | |
| workflow_dispatch: | |
| jobs: | |
| format-check: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: '24' | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Check formatting with Prettier | |
| run: npm run prettier-check | |
| type-check: | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: '24' | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Generate Wrangler types | |
| run: npm run types | |
| - name: Check TypeScript types | |
| run: npm run check-types | |
| integrity-test: | |
| if: github.event_name != 'schedule' || github.event.schedule == '42 3 22 * *' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: '24' | |
| - name: Set up Python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: '3.12' | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install requests | |
| - name: Create environment variables file | |
| run: | | |
| echo "IP_HASH_SALT=\"${{ secrets.IP_HASH_SALT }}\"" > .dev.vars | |
| - name: Start Wrangler dev server | |
| run: | | |
| npm run dev -- --show-interactive-dev-session=false --port 8787 & | |
| sleep 15 | |
| - name: Run API integrity tests | |
| run: | | |
| curl -sL "${{ vars.GIST_TEST_SCRIPT }}" -o meteorites-api.py | |
| python meteorites-api.py \ | |
| --remote "http://localhost:8787" \ | |
| --timeout 25 \ | |
| --delay 10 \ | |
| --max-radius 2500 \ | |
| --max-random 1000 \ | |
| --max-search 500 | |
| dataset-diff-check: | |
| if: github.event_name != 'schedule' || github.event.schedule == '13 1 14 * *' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: '3.12' | |
| - name: Compare meteorites dataset | |
| run: | | |
| curl -sL "${{ vars.GIST_COMPARE_SCRIPT }}" -o meteorites-diff.py | |
| python meteorites-diff.py \ | |
| --local-file "data/meteorites.csv" \ | |
| --remote-file "${{ vars.METEORITES_REMOTE_CSV }}" |