feat: CI
This commit is contained in:
24
.gitea/workflows/build.yaml
Normal file
24
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [prod]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-and-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install Zig
|
||||||
|
run: snap install zig --classic --beta
|
||||||
|
|
||||||
|
- name: Build binary
|
||||||
|
run: zig build
|
||||||
|
|
||||||
|
- name: Prepare artifact
|
||||||
|
run: |
|
||||||
|
mkdir -p out
|
||||||
|
cp zig-out/bin/snake out/
|
||||||
17
.gitea/workflows/test.yaml
Normal file
17
.gitea/workflows/test.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
name: test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install Zig
|
||||||
|
run: snap install zig --classic --beta
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: zig build test
|
||||||
Reference in New Issue
Block a user