Skip to content

Commit

Permalink
CI: Fix bugs in new CI flow
Browse files Browse the repository at this point in the history
Signed-off-by: Knut Ahlers <knut@ahlers.me>
  • Loading branch information
Luzifer committed Apr 13, 2024
1 parent 8dd3d7d commit 0e46626
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 176 deletions.
95 changes: 13 additions & 82 deletions .github/workflows/generated_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
run:
shell: bash
container:
image: luzifer/archlinux
image: luzifer/gh-arch-env
env:
CGO_ENABLED: 0
GOPATH: /go
Expand All @@ -21,18 +21,11 @@ jobs:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Install required packages
run: |
pacman -Syy --noconfirm \
curl \
git \
git-lfs \
make \
tar
- uses: actions/checkout@v4
with:
lfs: true
show-progress: false
submodules: true
- name: Marking workdir safe
run: git config --global --add safe.directory /__w/twitch-bot/twitch-bot
- name: Generate documentation
Expand All @@ -54,7 +47,6 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
lfs: true
show-progress: false
- name: Log into registry
uses: docker/login-action@v3
Expand All @@ -72,24 +64,20 @@ jobs:
run:
shell: bash
container:
image: luzifer/archlinux
image: luzifer/gh-arch-env
env:
CGO_ENABLED: 0
GOPATH: /go
runs-on: ubuntu-latest
services:
crdb:
image: luzifer/crdb-gh-service
options: --health-cmd 'curl -sSf http://localhost:8080/health' --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages
run: |
pacman -Syy --noconfirm \
cockroachdb-bin \
git \
go \
make
cockroachdb-bin
- uses: actions/checkout@v4
with:
show-progress: false
Expand All @@ -115,7 +103,7 @@ jobs:
run:
shell: bash
container:
image: luzifer/archlinux
image: luzifer/gh-arch-env
env:
CGO_ENABLED: 0
GOPATH: /go
Expand All @@ -127,15 +115,11 @@ jobs:
MYSQL_PASSWORD: twitch-bot-pass
MYSQL_ROOT_PASSWORD: root-pass
MYSQL_USER: twitch-bot
options: --health-cmd 'healthcheck.sh --connect --innodb_initialized' --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages
run: |
pacman -Syy --noconfirm \
git \
go \
make \
mariadb-clients
- uses: actions/checkout@v4
with:
Expand All @@ -161,7 +145,7 @@ jobs:
run:
shell: bash
container:
image: luzifer/archlinux
image: luzifer/gh-arch-env
env:
CGO_ENABLED: 0
GOPATH: /go
Expand All @@ -173,15 +157,11 @@ jobs:
MYSQL_PASSWORD: twitch-bot-pass
MYSQL_ROOT_PASSWORD: root-pass
MYSQL_USER: twitch-bot
options: --health-cmd 'mysqladmin ping' --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages
run: |
pacman -Syy --noconfirm \
git \
go \
make \
mariadb-clients
- uses: actions/checkout@v4
with:
Expand All @@ -207,7 +187,7 @@ jobs:
run:
shell: bash
container:
image: luzifer/archlinux
image: luzifer/gh-arch-env
env:
CGO_ENABLED: 0
GOPATH: /go
Expand All @@ -217,15 +197,8 @@ jobs:
image: postgres:15
env:
POSTGRES_PASSWORD: twitch-bot-pass
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages
run: |
pacman -Syy --noconfirm \
git \
go \
make
- uses: actions/checkout@v4
with:
show-progress: false
Expand All @@ -244,35 +217,14 @@ jobs:
run:
shell: bash
container:
image: luzifer/archlinux
image: luzifer/gh-arch-env
env:
CGO_ENABLED: 0
GOPATH: /go
runs-on: ubuntu-latest
steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages
run: |
pacman -Syy --noconfirm \
awk \
curl \
diffutils \
git \
git-lfs \
go \
golangci-lint-bin \
make \
nodejs-lts-hydrogen \
npm \
tar \
trivy \
unzip \
which \
zip
- uses: actions/checkout@v4
with:
lfs: true
show-progress: false
- name: Marking workdir safe
run: |
Expand Down Expand Up @@ -300,35 +252,14 @@ jobs:
run:
shell: bash
container:
image: luzifer/archlinux
image: luzifer/gh-arch-env
env:
CGO_ENABLED: 0
GOPATH: /go
runs-on: ubuntu-latest
steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages
run: |
pacman -Syy --noconfirm \
awk \
curl \
diffutils \
git \
git-lfs \
go \
golangci-lint-bin \
make \
nodejs-lts-hydrogen \
npm \
tar \
trivy \
unzip \
which \
zip
- uses: actions/checkout@v4
with:
lfs: true
show-progress: false
- name: Marking workdir safe
run: |
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ frontend_lint: node_modules
src

node_modules:
npm ci
npm ci --include dev

# --- Tools

Expand Down
13 changes: 2 additions & 11 deletions ci/workflow-parts/part_doc-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defaults:
shell: bash

container:
image: luzifer/archlinux
image: luzifer/gh-arch-env
env:
CGO_ENABLED: 0
GOPATH: /go
Expand All @@ -21,20 +21,11 @@ permissions:
runs-on: ubuntu-latest

steps:

- name: Install required packages
run: |
pacman -Syy --noconfirm \
curl \
git \
git-lfs \
make \
tar
- uses: actions/checkout@v4
with:
lfs: true
show-progress: false
submodules: true

- name: Marking workdir safe
run: git config --global --add safe.directory /__w/twitch-bot/twitch-bot
Expand Down
1 change: 0 additions & 1 deletion ci/workflow-parts/part_docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
show-progress: false

- name: Log into registry
Expand Down
15 changes: 7 additions & 8 deletions ci/workflow-parts/part_integration-crdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defaults:
shell: bash

container:
image: luzifer/archlinux
image: luzifer/gh-arch-env
env:
CGO_ENABLED: 0
GOPATH: /go
Expand All @@ -18,18 +18,17 @@ runs-on: ubuntu-latest
services:
crdb:
image: luzifer/crdb-gh-service
options: >-
--health-cmd 'curl -sSf http://localhost:8080/health'
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf

- name: Install required packages
run: |
pacman -Syy --noconfirm \
cockroachdb-bin \
git \
go \
make
cockroachdb-bin
- uses: actions/checkout@v4
with:
Expand Down
13 changes: 6 additions & 7 deletions ci/workflow-parts/part_integration-mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defaults:
shell: bash

container:
image: luzifer/archlinux
image: luzifer/gh-arch-env
env:
CGO_ENABLED: 0
GOPATH: /go
Expand All @@ -22,17 +22,16 @@ services:
MYSQL_PASSWORD: twitch-bot-pass
MYSQL_ROOT_PASSWORD: root-pass
MYSQL_USER: twitch-bot
options: >-
--health-cmd 'healthcheck.sh --connect --innodb_initialized'
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf

- name: Install required packages
run: |
pacman -Syy --noconfirm \
git \
go \
make \
mariadb-clients
- uses: actions/checkout@v4
Expand Down
13 changes: 6 additions & 7 deletions ci/workflow-parts/part_integration-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defaults:
shell: bash

container:
image: luzifer/archlinux
image: luzifer/gh-arch-env
env:
CGO_ENABLED: 0
GOPATH: /go
Expand All @@ -22,17 +22,16 @@ services:
MYSQL_PASSWORD: twitch-bot-pass
MYSQL_ROOT_PASSWORD: root-pass
MYSQL_USER: twitch-bot
options: >-
--health-cmd 'mysqladmin ping'
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf

- name: Install required packages
run: |
pacman -Syy --noconfirm \
git \
go \
make \
mariadb-clients
- uses: actions/checkout@v4
Expand Down
17 changes: 6 additions & 11 deletions ci/workflow-parts/part_integration-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defaults:
shell: bash

container:
image: luzifer/archlinux
image: luzifer/gh-arch-env
env:
CGO_ENABLED: 0
GOPATH: /go
Expand All @@ -20,18 +20,13 @@ services:
image: postgres:15
env:
POSTGRES_PASSWORD: twitch-bot-pass
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf

- name: Install required packages
run: |
pacman -Syy --noconfirm \
git \
go \
make
- uses: actions/checkout@v4
with:
show-progress: false
Expand Down
Loading

0 comments on commit 0e46626

Please sign in to comment.