Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test deployment status #121

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
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
24 changes: 0 additions & 24 deletions .github/workflows/main.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deployment status

on:
deployment_status:
jobs:
run-e2es:
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: node test.mjs
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: latest
cache: pnpm

- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile

- name: Run argos upload
run: pnpm exec argos upload ./argos-images
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEBUG: "@argos-ci/core"
Binary file added argos-images/playwright-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@argos-ci/cli": "^1.0.5",
"@argos-ci/cypress": "^1.3.0",
"@argos-ci/cli": "1.0.7-alpha.6+505aabe",
"@argos-ci/cypress": "1.3.3-alpha.6+505aabe",
"@babel/core": "^7.23.7",
"@radix-ui/colors": "^3.0.0",
"@tailwindcss/typography": "^0.5.10",
Expand Down
24 changes: 12 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { existsSync, readFileSync } from "node:fs";

const { env } = process;

function readEventPayload() {
if (!env.GITHUB_EVENT_PATH) {
throw new Error("GITHUB_EVENT_PATH not defined");
}
if (!existsSync(env.GITHUB_EVENT_PATH)) {
throw new Error(`No event found at ${env.GITHUB_EVENT_PATH}`);
}
return JSON.parse(readFileSync(env.GITHUB_EVENT_PATH, "utf-8"));
}

console.log(JSON.stringify(readEventPayload(), null, 2));
Loading