Skip to content

Commit

Permalink
Merge pull request #48 from collective/add_build_test
Browse files Browse the repository at this point in the history
add build test
  • Loading branch information
djay authored Jun 18, 2024
2 parents c4f12ec + f53e8d5 commit 81f5e05
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 8 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/dispatch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Kickoff deploy

on:
push:
workflow_run:
workflows: ["Build and test"]
branches: [ main ]

jobs:
Expand All @@ -10,9 +11,18 @@ jobs:
runs-on: "ubuntu-latest"

steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.DEPLOY_PAT }}
repository: pretagov/deploy-helm
event-type: deploy
# - name: Repository Dispatch
# uses: peter-evans/repository-dispatch@v3
# with:
# token: ${{ secrets.DEPLOY_PAT }}
# repository: pretagov/deploy-helm
# event-type: deploy
- name: Workflow Dispatch
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.DEPLOY_PAT }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://github.com/gitapi/repos/pretagov/deploy-helm/actions/workflows/deploy-to-k8s/dispatches \
-d '{"ref":"main","inputs":{}}'
38 changes: 38 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and test

on:
push:

jobs:
build-test:

runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: pnpm/action-setup@v4
#with:
# version: 8
# run_install: |
# - args: [dlx, mrs-developer, missdev, --no-config, --fetch-https]
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: |
pnpm dlx mrs-developer missdev --no-config --fetch-https
# pnpm install --frozen-lockfile
- name: Check pnpm lockfile consistency
run: |
pnpm install --lockfile-only
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ core
node_modules
results
yarn.lock
.github
dist

0 comments on commit 81f5e05

Please sign in to comment.