Skip to content

Commit

Permalink
feat(ci): add workflow dispatch to allow debugging of individual work…
Browse files Browse the repository at this point in the history
…flows (#1166)

Also format workflows consistently with yaml formatter
  • Loading branch information
corneliusroemer committed Feb 28, 2024
1 parent c961dca commit 15bd9b0
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 82 deletions.
1 change: 1 addition & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: backend

on:
push:
workflow_dispatch:

env:
DOCKER_IMAGE_NAME: ghcr.io/loculus-project/backend
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/config-preprocessor-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: config-processor-build

on:
push:
workflow_dispatch:

env:
DOCKER_IMAGE_NAME: ghcr.io/loculus-project/config-processor
Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,26 @@ name: Docs Build Check
on:
push:
paths:
- 'docs/**'
- "docs/**"
workflow_dispatch:

jobs:
check-docs-build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "20"

- name: Install Dependencies
run: npm install
working-directory: ./docs
- name: Install Dependencies
run: npm install
working-directory: ./docs

- name: Check Build
run: npm run build
working-directory: ./docs
- name: Check Build
run: npm run build
working-directory: ./docs
48 changes: 24 additions & 24 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Navigate to docs directory
run: cd docs

- name: Install Dependencies
run: npm install
working-directory: ./docs

- name: Build Project
run: npm run build
working-directory: ./docs

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/dist # Adjust if your build output directory is different
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "20"

- name: Navigate to docs directory
run: cd docs

- name: Install Dependencies
run: npm install
working-directory: ./docs

- name: Build Project
run: npm run build
working-directory: ./docs

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/dist # Adjust if your build output directory is different
1 change: 1 addition & 0 deletions .github/workflows/dummyPreprocessing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: preprocessing-dummy

on:
push:
workflow_dispatch:

env:
DOCKER_IMAGE_NAME: ghcr.io/loculus-project/preprocessing-dummy
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/format-website-on-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "20"

- name: NPM install and format website
working-directory: website
run: |
npm install
npm run format
- name: NPM install and format website
working-directory: website
run: |
npm install
npm run format
- name: Commit and Push Changes
run: |
git config --global user.name 'Loculus bot'
git config --global user.email 'bot@loculus.org'
git add -A
git commit -m "Automated code formatting" || echo "No changes to commit"
git push
- name: Commit and Push Changes
run: |
git config --global user.name 'Loculus bot'
git config --global user.email 'bot@loculus.org'
git add -A
git commit -m "Automated code formatting" || echo "No changes to commit"
git push
55 changes: 28 additions & 27 deletions .github/workflows/node_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,39 @@ name: Dev server test
on:
push:
paths:
- 'website/**'
- 'deploy.py'
- "website/**"
- "deploy.py"
workflow_dispatch:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: azure/setup-helm@v3
- name: Checkout repository
uses: actions/checkout@v4
- name: Install yaml package
run: pip install PyYAML requests
- uses: azure/setup-helm@v3
- name: Checkout repository
uses: actions/checkout@v4
- name: Install yaml package
run: pip install PyYAML requests

- name: Generate local test config
run: ./generate_local_test_config.sh

- name: Install dependencies
working-directory: website
run: |
npm install
npm install playwright --save-dev
- name: Test dev node server
working-directory: website
run: |
npm run start &
npx playwright install chromium
- name: Generate local test config
run: ./generate_local_test_config.sh

- name: Install dependencies
working-directory: website
run: |
npm install
npm install playwright --save-dev
- name: Test dev node server
working-directory: website
run: |
npm run start &
npx playwright install chromium

npx playwright screenshot localhost:3000 test.png
sleep 5
npx playwright screenshot localhost:3000 test.png

npx playwright screenshot localhost:3000 test.png
sleep 5
npx playwright screenshot localhost:3000 test.png
1 change: 1 addition & 0 deletions .github/workflows/preprocessing-nextclade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: preprocessing-nextclade

on:
push:
workflow_dispatch:

env:
DOCKER_IMAGE_NAME: ghcr.io/loculus-project/preprocessing-nextclade
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update-argocd-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
workflow_dispatch:

jobs:
update:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: website

on:
push:
workflow_dispatch:

env:
DOCKER_IMAGE_NAME: ghcr.io/loculus-project/website
Expand Down

0 comments on commit 15bd9b0

Please sign in to comment.