feat: can disable new user registration at /user/login API around w3u… #1632
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: DB | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'packages/db/**' | |
- '.github/workflows/db.yml' | |
- 'package-lock.json' | |
# Nothing to do on PR yet, but having the check appear on the PR serves as a reminder | |
# that we don't have proper tests for db changes yet, and that merging it will deploy. | |
pull_request: | |
paths: | |
- 'packages/db/**' | |
- '.github/workflows/db.yml' | |
- 'package-lock.json' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Test | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- uses: bahmutov/npm-install@v1 | |
- run: npx playwright install-deps | |
- run: npm test --workspace packages/db | |
env: | |
PG_REST_URL: ${{secrets.PG_REST_URL}} | |
PG_REST_JWT: ${{secrets.PG_REST_JWT}} | |
PG_CONNECTION: ${{secrets.PG_CONNECTION}} | |
DAG_CARGO_HOST: ${{secrets.DAG_CARGO_HOST}} | |
DAG_CARGO_DATABASE: ${{secrets.DAG_CARGO_DATABASE}} | |
DAG_CARGO_USER: ${{secrets.DAG_CARGO_USER}} | |
DAG_CARGO_PASSWORD: ${{secrets.DAG_CARGO_PASSWORD}} | |
deploy-staging: | |
name: Deploy Staging DB | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- uses: bahmutov/npm-install@v1 | |
# TODO: Update schema on changes | |
# - name: Update Postgres resources | |
- name: Test upload to staging | |
run: | | |
npm run build -w packages/client | |
echo "$(date --utc --iso-8601=seconds) web3.storage upload test" > ./upload-test-small | |
./packages/w3/bin.js put ./upload-test-small --api https://api-staging.web3.storage --token ${{ secrets.STAGING_WEB3_TOKEN }} |