Skip to content

Commit

Permalink
github-action: initial scaffolding (#27)
Browse files Browse the repository at this point in the history
* github-action: initial scaffolding

* Apply suggestions from code review
  • Loading branch information
v1v authored Apr 26, 2024
1 parent 8fcb590 commit 2adcf9f
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/actions/env-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---

name: Environment installation
description: Install python, poetry

runs:
using: "composite"
steps:
- name: Install python runtime
uses: actions/setup-python@v5
with:
python-version-file: '.python-version'

41 changes: 41 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
version: 2
updates:
# Enable version updates for python
- package-ecosystem: "pip"
directory: "/"
# Check for updates once a week
schedule:
interval: "weekly"
day: "sunday"
time: "22:00"
reviewers:
- "elastic/apm-agent-python"

# GitHub actions
- package-ecosystem: "github-actions"
directory: "/"
reviewers:
- "elastic/observablt-ci"
schedule:
interval: "weekly"
day: "sunday"
time: "22:00"
groups:
github-actions:
patterns:
- "*"

# GitHub composite actions
- package-ecosystem: "github-actions"
directory: "/.github/actions/env-install"
reviewers:
- "elastic/observablt-ci"
schedule:
interval: "weekly"
day: "sunday"
time: "22:00"
groups:
github-actions:
patterns:
- "*"
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: ci

on:
pull_request:
push:
branches:
- main

permissions:
contents: read

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/env-install
- uses: pre-commit/action@v3.0.1

22 changes: 22 additions & 0 deletions .github/workflows/opentelemetry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# Look up results at https://ela.st/oblt-ci-cd-stats
# There will be one service per GitHub repository, including the org name, and one Transaction per Workflow.
name: OpenTelemetry Export Trace

on:
workflow_run:
workflows: [ "*" ]
types: [completed]

permissions:
contents: read

jobs:
otel-export-trace:
runs-on: ubuntu-latest
steps:
- uses: elastic/apm-pipeline-library/.github/actions/opentelemetry@current
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ coverage.xml
tests/*-junit.xml
*.code-workspace
.pytest_cache/
.python-version
.env
.aws
.arn-file.md
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11.8

0 comments on commit 2adcf9f

Please sign in to comment.