Skip to content

Add Roadie API Docs #2920

Add Roadie API Docs

Add Roadie API Docs #2920

Workflow file for this run

---
name: Run tests
on:
pull_request:
branches:
- main
jobs:
build_and_test:
runs-on: ubuntu-latest
env:
CI: true
NODE_ENV: test
steps:
- name: Log node version
run: node --version
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Check TechDocs
run: yarn tech-docs:build
- name: Lint
run: yarn lint
- name: Unit test
run: yarn test:unit
- name: Build static site
run: yarn build
env:
GATSBY_ALGOLIA_APP_ID: ${{ secrets.GATSBY_ALGOLIA_APP_ID }}
GATSBY_ALGOLIA_SEARCH_KEY: ${{ secrets.GATSBY_ALGOLIA_SEARCH_KEY }}
ALGOLIA_SKIP_INDEXING: true
CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_ACCESS_TOKEN }}
GATSBY_RECAPTCHAS_ENABLED: false
- name: Fetch Scaffolder API Docs
uses: JamesIves/fetch-api-data-action@v2
with:
endpoint: https://api.roadie.so/api/scaffolder/api-docs
configuration: '{ "method": "GET", "headers": {"Authorization": "Bearer ${{ secrets.ROADIE_API_TOKEN }}"} }'
save-location: 'static/scaffolder-openapi.json'
- name: Fetch Catalog API Docs
uses: JamesIves/fetch-api-data-action@v2
with:
endpoint: https://api.roadie.so/api/catalog/api-docs
configuration: '{ "method": "GET", "headers": {"Authorization": "Bearer ${{ secrets.ROADIE_API_TOKEN }}"} }'
save-location: 'static/catalog-openapi.json'
- name: Fetch Tech Insights API Docs
uses: JamesIves/fetch-api-data-action@v2
with:
endpoint: https://api.roadie.so/api/tech-insights/v1/api-docs
configuration: '{ "method": "GET", "headers": {"Authorization": "Bearer ${{ secrets.ROADIE_API_TOKEN }}"} }'
save-location: 'static/tech-insights-openapi.json'
- name: Cypress run
uses: cypress-io/github-action@v4
with:
start: yarn serve --port 8001
- name: Upload screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- name: Upload videos
uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: cypress/videos