Skip to content

Commit

Permalink
test(*): Add action for testing with github action initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
julienloizelet committed Jul 10, 2023
1 parent 9d5bcc6 commit 3a8adca
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/tests-with-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: tests with action
on:
pull_request:
push:
branches: [ main ]
paths-ignore:
- '**.md'

schedule:
- cron: '25 06 * * *'

workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: Debug with tmate
default: false

permissions:
contents: write

defaults:
run:
shell: bash

env:
DDEV_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
tests-with-action:
defaults:
run:
shell: bash

strategy:
matrix:
ddev_version: [stable, HEAD]
fail-fast: false

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3

- uses: julienloizelet/ddev-add-on-test-init@main
with:
ddev_version: ${{ matrix.ddev_version }}

- name: tmate debugging session
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
github-token: ${{ secrets.GITHUB_TOKEN }}
if: github.event.inputs.debug_enabled == 'true'

- name: tests
run: bats tests

# keepalive-workflow adds a dummy commit if there's no other action here, keeps
# GitHub from turning off tests after 60 days
- uses: gautamkrishnar/keepalive-workflow@v1
if: matrix.ddev_version == 'stable'
with:
commit_message: "chore(*): Automated commit to keep the repository active"
time_elapsed: 55


0 comments on commit 3a8adca

Please sign in to comment.