Skip to content

Test Devcontainer

Test Devcontainer #55

name: Test Devcontainer
on:
schedule:
- cron: "30 5 * * 1,3"
push:
branches:
- main
paths:
- .devcontainer/**
pull_request:
paths:
- .devcontainer/**
jobs:
test:
strategy:
matrix:
# I dont have time to implement test on macOS and Windows for now.
os: [ubuntu-latest]
name: Test Devcontainer on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Build and run Dev Container tests
id: devcontainers-tests
uses: devcontainers/[email protected]
with:
push: never
noCache: true
runCmd: |
echo "Devcontainer is running... Exiting in 5 seconds."
sleep 5
- name: Create Issue on Failure
if: failure() && steps.devcontainers-tests.outcome == 'failure'
uses: actions/github-script@v7
with:
script: |
const issue = {
owner: context.repo.owner,
repo: context.repo.repo,
title: "Test Devcontainer failed on ${{ matrix.os }}",
assignees: ["{{ context.repo.owner }}"],
labels: ["aspect/dex 🤖", "type/bug 🔥"],
body: `The Test Devcontainer workflow failed on ${{ matrix.os }}. Please investigate. [Workflow Run](${context.payload.workflow.run_url})`,
};
// github.rest.issues.create(issue);