PR #799
Workflow file for this run
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: pr | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
SERVICE_NAME: wallet-service | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
- name: Cache node_modules | |
uses: actions/cache@v3.3.1 | |
with: | |
path: | | |
**/node_modules | |
key: | | |
node-${{ hashfiles('**/package-lock.json') }} | |
restore-keys: | | |
node- | |
# - name: Get firebase-tools | |
# run: npm install -g firebase-tools | |
- name: Install Packages | |
run: npm install | |
- uses: bufbuild/buf-setup-action@v1.23.1 | |
with: | |
github_token: ${{ github.token }} | |
- name: Build protobuf | |
run: buf generate | |
- name: Lint | |
uses: trunk-io/trunk-action@v1 | |
# - name: Test | |
# run: npm test:integration | |
preview: | |
name: Preview Infra | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
env: | |
SERVICE_NAME: recharge-service | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- run: npm install | |
working-directory: infra | |
- name: Cache node_modules | |
uses: actions/cache@v3.3.1 | |
with: | |
path: | | |
**/node_modules | |
key: | | |
node-${{ hashfiles('**/package-lock.json') }} | |
restore-keys: | | |
node- | |
- name: Authenticate Google Cloud | |
uses: google-github-actions/auth@v1 | |
with: | |
token_format: access_token | |
workload_identity_provider: projects/486946551871/locations/global/workloadIdentityPools/github-actions/providers/github-actions-provider | |
service_account: artifact-registry-admin@ride-app-prod.iam.gserviceaccount.com | |
- uses: pulumi/actions@v4 | |
with: | |
work-dir: infra | |
command: preview | |
stack-name: ride/prod | |
env: | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} |