Skip to content

Commit

Permalink
ci: use staging API
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianAndersen committed Aug 12, 2024
1 parent e101d7a commit b4d4309
Showing 1 changed file with 63 additions and 63 deletions.
126 changes: 63 additions & 63 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,27 @@ jobs:
- name: eslint
run: yarn lint

setup_backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: "./bl-api"
repository: boklisten/bl-api
- name: Compile
run: |
cd bl-api
yarn install --frozen-lockfile
yarn build
- name: Cache backend
uses: actions/cache@v4
with:
path: ./bl-api/
key: ${{ github.sha }}-backend
# setup_backend:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# path: "./bl-api"
# repository: boklisten/bl-api
# - name: Compile
# run: |
# cd bl-api
# yarn install --frozen-lockfile
# yarn build
# - name: Cache backend
# uses: actions/cache@v4
# with:
# path: ./bl-api/
# key: ${{ github.sha }}-backend

build:
runs-on: ubuntu-latest
needs: [install, setup_backend]
needs: [install] #, setup_backend]
steps:
- uses: actions/checkout@v4
- name: Retrive Install Cache
Expand All @@ -91,51 +91,51 @@ jobs:
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
- name: Retrive backend cache
uses: actions/cache@v4
with:
path: ./bl-api/
key: ${{ github.sha }}-backend
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0
with:
mongodb-version: "7.0"
- name: Start backend
run: |
cd bl-api
yarn load_fixtures
yarn serve &
env:
PORT: 1337
BLAPI_HOST: localhost
BLAPI_PORT: 1337
MONGODB_URI: mongodb://localhost:27017/test
SERVER_PATH: /
NODE_ENV: dev
LOG_LEVEL: silly
URI_WHITELIST: localhost:3000 http://localhost:3000
ACCESS_TOKEN_SECRET: not_secret_at_all
BL_API_URI: http://localhost:1337/
CLIENT_URI: http://localhost:3000/
REFRESH_TOKEN_SECRET: not_the_prod_secret
DIBS_CHECKOUT_KEY: ${{ secrets.DIBS_CHECKOUT_KEY }}
DIBS_SECRET_KEY: ${{ secrets.DIBS_CHECKOUT_SECRET }}
DIBS_URI: https://test.api.dibspayment.eu/v1/
FACEBOOK_CLIENT_ID: 123
FACEBOOK_SECRET: 123
FEIDE_AUTHORIZATION_URL: https://auth.dataporten.no/oauth/authorization
FEIDE_CLIENT_ID: yello
FEIDE_SECRET: foo
FEIDE_TOKEN_URL: https://auth.dataporten.no/oauth/token
FEIDE_USER_INFO_URL: https://auth.dataporten.no/userinfo
GOOGLE_CLIENT_ID: totally_legit
GOOGLE_SECRET: nope
SENDGRID_API_KEY: foo
TWILIO_SMS_AUTH_TOKEN: foo
TWILIO_SMS_SID: ACfoo
TWILIO_STATUS_CALLBACK_URL: foo
BRING_API_KEY: ${{ secrets.BRING_API_KEY }}
BRING_API_ID: ${{ secrets.BRING_API_ID }}
# - name: Retrive backend cache
# uses: actions/cache@v4
# with:
# path: ./bl-api/
# key: ${{ github.sha }}-backend
# - name: Start MongoDB
# uses: supercharge/mongodb-github-action@1.10.0
# with:
# mongodb-version: "7.0"
# - name: Start backend
# run: |
# cd bl-api
# yarn load_fixtures
# yarn serve &
# env:
# PORT: 1337
# BLAPI_HOST: localhost
# BLAPI_PORT: 1337
# MONGODB_URI: mongodb://localhost:27017/test
# SERVER_PATH: /
# NODE_ENV: dev
# LOG_LEVEL: silly
# URI_WHITELIST: localhost:3000 http://localhost:3000
# ACCESS_TOKEN_SECRET: not_secret_at_all
# BL_API_URI: http://localhost:1337/
# CLIENT_URI: http://localhost:3000/
# REFRESH_TOKEN_SECRET: not_the_prod_secret
# DIBS_CHECKOUT_KEY: ${{ secrets.DIBS_CHECKOUT_KEY }}
# DIBS_SECRET_KEY: ${{ secrets.DIBS_CHECKOUT_SECRET }}
# DIBS_URI: https://test.api.dibspayment.eu/v1/
# FACEBOOK_CLIENT_ID: 123
# FACEBOOK_SECRET: 123
# FEIDE_AUTHORIZATION_URL: https://auth.dataporten.no/oauth/authorization
# FEIDE_CLIENT_ID: yello
# FEIDE_SECRET: foo
# FEIDE_TOKEN_URL: https://auth.dataporten.no/oauth/token
# FEIDE_USER_INFO_URL: https://auth.dataporten.no/userinfo
# GOOGLE_CLIENT_ID: totally_legit
# GOOGLE_SECRET: nope
# SENDGRID_API_KEY: foo
# TWILIO_SMS_AUTH_TOKEN: foo
# TWILIO_SMS_SID: ACfoo
# TWILIO_STATUS_CALLBACK_URL: foo
# BRING_API_KEY: ${{ secrets.BRING_API_KEY }}
# BRING_API_ID: ${{ secrets.BRING_API_ID }}
- name: Build
run: yarn build
- name: Cache build
Expand Down

0 comments on commit b4d4309

Please sign in to comment.