Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,29 @@ jobs:
with:
path: pr

- uses: actions/checkout@v6
with:
ref: main
path: main

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies (main)
run: bun install
working-directory: main

- name: Install dependencies (PR)
run: bun install
working-directory: pr

- name: Build old binary
- name: Download latest released binary
env:
GH_TOKEN: ${{ github.token }}
run: |
bun build src/index.ts \
--compile \
--target=${{ matrix.target }} \
--define "process.env.BUILD_VERSION=\"0.1.0\"" \
--outfile dist/glean-mdm-old${{ matrix.ext }}
working-directory: main
asset_target="${{ matrix.target }}"
asset_target="${asset_target#bun-}"
asset="glean-mdm-${asset_target}${{ matrix.ext }}"
echo "Downloading latest release asset: ${asset}"

gh release download \
--repo "$GITHUB_REPOSITORY" \
--pattern "$asset" \
--output "$GITHUB_WORKSPACE/glean-mdm-old${{ matrix.ext }}" \
--clobber
chmod 755 "$GITHUB_WORKSPACE/glean-mdm-old${{ matrix.ext }}"

- name: Build new binary (PR)
run: |
Expand All @@ -78,8 +76,9 @@ jobs:

- name: Run E2E update test
run: |
OLD=main/dist/glean-mdm-old${{ matrix.ext }}
pr/ci/e2e-update-test.sh "$OLD" pr/dist/glean-mdm-new${{ matrix.ext }}
pr/ci/e2e-update-test.sh \
"$GITHUB_WORKSPACE/glean-mdm-old${{ matrix.ext }}" \
pr/dist/glean-mdm-new${{ matrix.ext }}

e2e-error-handling:
strategy:
Expand Down