Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
59 changes: 59 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
version: 2

updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
day: monday
time: "09:00"
timezone: Etc/UTC
open-pull-requests-limit: 5
labels:
- dependencies
- python
commit-message:
prefix: chore(deps)

- package-ecosystem: npm
directory: "/web"
schedule:
interval: weekly
day: monday
time: "09:00"
timezone: Etc/UTC
open-pull-requests-limit: 5
labels:
- dependencies
- javascript
commit-message:
prefix: chore(deps-web)
groups:
astro:
patterns:
- "astro"
- "@astrojs/*"
tailwind:
patterns:
- "tailwindcss"
- "@tailwindcss/*"
react:
patterns:
- "react"
- "react-dom"
- "@types/react"
- "@types/react-dom"

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
day: monday
time: "09:00"
timezone: Etc/UTC
open-pull-requests-limit: 5
labels:
- dependencies
- github-actions
commit-message:
prefix: chore(deps-actions)
77 changes: 77 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: audit

on:
schedule:
- cron: '0 6 * * 1'
workflow_dispatch:
pull_request:
paths:
- 'requirements*.txt'
- 'web/package*.json'
- '.github/workflows/audit.yml'

permissions:
contents: read

jobs:
python-vuln:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install pip-audit
- name: pip-audit (runtime + dev)
run: pip-audit -r requirements.txt -r requirements-dev.txt

python-license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install -r requirements.txt -r requirements-dev.txt pip-licenses
- name: report licenses
run: pip-licenses --format=markdown --output-file=python-licenses.md
- name: fail on copyleft (GPL family except LGPL)
run: |
if pip-licenses --format=plain-vertical --with-license-file=false \
| grep -E '^(License: )?(GNU )?(Affero )?General Public License' \
| grep -v 'Lesser'; then
echo "::error::Copyleft license found in dependency tree."
exit 1
fi
- uses: actions/upload-artifact@v4
with:
name: python-licenses
path: python-licenses.md
retention-days: 30

npm-vuln:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm install --prefix web
- name: npm audit (production, high+)
run: npm audit --prefix web --omit=dev --audit-level=high

npm-license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm install --prefix web
- name: report licenses
run: npx --yes license-checker --start web --production --summary > npm-licenses.txt
- uses: actions/upload-artifact@v4
with:
name: npm-licenses
path: npm-licenses.txt
retention-days: 30
101 changes: 101 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: ci

on:
pull_request:
push:
branches: [main]
paths-ignore:
- 'tracks/*/data/**'
- 'tracks/*/reports/**'
- '_notes/**'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
lint-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
cache-dependency-path: |
requirements.txt
requirements-dev.txt
- run: pip install -r requirements.txt -r requirements-dev.txt
- name: ruff check
run: ruff check .
- name: ruff format --check
run: ruff format --check .

lint-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm install --prefix web
- name: astro check (type-check Astro + TS)
run: npm run check --prefix web

lint-meta:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: markdownlint-cli2
run: npx --yes markdownlint-cli2 "**/*.md"
- name: actionlint
uses: raven-actions/actionlint@v2
with:
fail_on_error: true

test-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
cache-dependency-path: |
requirements.txt
requirements-dev.txt
- run: pip install -r requirements.txt -r requirements-dev.txt
- name: pytest
run: pytest --cov=awsdd --cov-report=term --cov-report=xml
- uses: actions/upload-artifact@v4
if: always()
with:
name: coverage
path: coverage.xml
retention-days: 14

build-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: python -m compileall -q scripts/awsdd

build-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm install --prefix web
- run: npm run build --prefix web
32 changes: 32 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: codeql

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 12 * * 1'

permissions:
contents: read
security-events: write
actions: read

jobs:
analyze:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [python, javascript-typescript]
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-and-quality
- uses: github/codeql-action/autobuild@v3
- uses: github/codeql-action/analyze@v3
with:
category: /language:${{ matrix.language }}
53 changes: 53 additions & 0 deletions .github/workflows/daily-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: daily-update

on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:
Comment thread
kanywst marked this conversation as resolved.

permissions:
contents: write

jobs:
update:
strategy:
fail-fast: false
matrix:
track: [iam, security, whats-new, releases]
runs-on: ubuntu-latest
concurrency:
group: update-${{ matrix.track }}
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
with:
# Pin to main so a workflow_dispatch from a feature branch can't
# publish data based on non-main code (the commit still lands on main).
ref: main
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
cache-dependency-path: requirements.txt
- run: pip install -r requirements.txt
- name: Run pipeline
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make -C tracks/${{ matrix.track }} update
- name: Commit and push
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add tracks/${{ matrix.track }}
if git diff --staged --quiet; then
echo "No changes."
exit 0
fi
git commit -m "chore(${{ matrix.track }}): daily update $(date -u +%Y-%m-%d)"
for i in 1 2 3 4 5; do
if git pull --rebase origin main && git push origin HEAD:main; then
exit 0
fi
sleep $((i * 5))
done
exit 1
51 changes: 51 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: deploy-pages

on:
push:
branches: [main]
paths:
- 'web/**'
- 'tracks/**'
- '.github/workflows/deploy-pages.yml'
workflow_dispatch:
Comment thread
coderabbitai[bot] marked this conversation as resolved.

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
# Pages publishes the default environment; never deploy from a non-main ref.
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm install --prefix web
- run: npm run build --prefix web
env:
PAGES_SITE: https://0-draft.github.io
PAGES_BASE: /aws-deepdive
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: web/dist

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
Loading
Loading