Skip to content

Commit

Permalink
Stop using Firebase Tokens in Build step (#683)
Browse files Browse the repository at this point in the history
* chore: remove reference firebase

* chore: format yml files
  • Loading branch information
ijemmao authored Jun 21, 2023
1 parent 070e061 commit 84bfa33
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 55 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ jobs:
backup:
name: Backup
runs-on: ubuntu-latest

steps:
- name: Git checkout files and create db directory
uses: actions/checkout@v2
- shell: bash
env:
MONGO_URI: ${{ secrets.MONGO_URI }}
DROPBOX_TOKEN: ${{ secrets.DROPBOX_TOKEN }}
# https://github.com/actions/virtual-environments/issues/1207
run: |
sudo apt-get install mongodb
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
mkdir igbo_api_db
./scripts/sync.sh $MONGO_URI $DROPBOX_TOKEN
- name: Git checkout files and create db directory
uses: actions/checkout@v2
- shell: bash
env:
MONGO_URI: ${{ secrets.MONGO_URI }}
DROPBOX_TOKEN: ${{ secrets.DROPBOX_TOKEN }}
# https://github.com/actions/virtual-environments/issues/1207
run: |
sudo apt-get install mongodb
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
mkdir igbo_api_db
./scripts/sync.sh $MONGO_URI $DROPBOX_TOKEN
44 changes: 21 additions & 23 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,25 @@ jobs:
matrix:
node-version: [18.x]
mongodb-version: [4.0, 4.2]

steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Use Node.js @${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Build Server
run: |
yarn install
npm install -g firebase-tools
firebase use staging --token $FIREBASE_TOKEN
yarn build
- name: Test Server Build Process
run: yarn test:build
- name: Test API
run: yarn jest
- name: Test API Homepage
run: yarn cypress:ci
- name: Git checkout
uses: actions/checkout@v2
- name: Use Node.js @${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Build Server
run: |
yarn install
yarn build
- name: Test Server Build Process
run: yarn test:build
- name: Test API
run: yarn jest
- name: Test API Homepage
run: yarn cypress:ci
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
run: yarn install

- name: Run ESLint
run: yarn run eslint ./src --ext .js,.jsx,.ts,.tsx -c ./.eslintrc.js
run: yarn run eslint ./src --ext .js,.jsx,.ts,.tsx -c ./.eslintrc.js
32 changes: 16 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js v18
uses: actions/setup-node@v1
with:
node-version: 18
- name: Install Dependencies
run: yarn install
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_ACCESS_TOKEN }}
run: npx semantic-release
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js v18
uses: actions/setup-node@v1
with:
node-version: 18
- name: Install Dependencies
run: yarn install
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_ACCESS_TOKEN }}
run: npx semantic-release
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"mongodump": "shx rm -rf dump/ && mongodump -d igbo_api -o dump",
"jest": "cross-env NODE_ENV=test jest --forceExit",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"cypress": "firebase functions:config:set runtime.env=test env.client_test=true && cross-env NODE_ENV=test npm-run-all -p start start:database cypress:open",
"cypress:ci": "firebase functions:config:set runtime.env=test env.client_test=true && cross-env NODE_ENV=test npm-run-all -p -r start cypress:run",
"cypress": "cross-env NODE_ENV=test npm-run-all -p start start:database cypress:open",
"cypress:ci": "cross-env NODE_ENV=test npm-run-all -p -r start cypress:run",
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"precommit": "lint-staged",
Expand Down

0 comments on commit 84bfa33

Please sign in to comment.