.gitea/workflows: merge build and test pipeline

This commit is contained in:
2026-03-02 14:31:59 +09:00
parent dcf5c8ebe7
commit b070a1fd31
2 changed files with 16 additions and 35 deletions

View File

@@ -1,5 +1,6 @@
name: "Build database"
name: "Build and test"
on:
workflow_dispatch:
pull_request:
push:
jobs:
@@ -13,9 +14,14 @@ jobs:
- name: Install nix
uses: https://github.com/cachix/install-nix-action@v31
- name: Configure nix
run: echo -e "show-trace = true\nmax-jobs = auto\ntrusted-users = root\nexperimental-features = nix-command flakes\nbuild-users-group =" > /etc/nix/nix.conf
with:
extra_nix_config: |
experimental-features = nix-command flakes
show-trace = true
max-jobs = auto
trusted-users = root
experimental-features = nix-command flakes
build-users-group =
- name: Update database inputs
run: |
@@ -36,3 +42,9 @@ jobs:
retention-days: 15
# Already compressed
compression: 0
- name: Print database statistics
run: nix develop .# --command sqlite3_analyzer result/jadb.sqlite
- name: Run tests
run: nix develop .# --command dart run test --concurrency=1

View File

@@ -1,31 +0,0 @@
name: "Run tests"
on:
pull_request:
push:
jobs:
evals:
runs-on: debian-latest
steps:
- uses: actions/checkout@v6
- name: Install sudo
run: apt-get update && apt-get -y install sudo
- name: Install nix
uses: https://github.com/cachix/install-nix-action@v31
- name: Configure nix
run: echo -e "show-trace = true\nmax-jobs = auto\ntrusted-users = root\nexperimental-features = nix-command flakes\nbuild-users-group =" > /etc/nix/nix.conf
- name: Update database inputs
run: |
nix flake update jmdict-src
nix flake update jmdict-with-examples-src
nix flake update radkfile-src
nix flake update kanjidic2-src
- name: Build database
run: nix build .#database -L
- name: Run tests
run: nix develop .# --command dart test