feat: test gitea actions with a real build!
All checks were successful
Build and test / Build (push) Successful in 2m10s

This commit is contained in:
Muyao CHEN
2024-10-08 23:22:00 +02:00
parent cc505e5a74
commit 8e73dc5f0b
5 changed files with 117 additions and 5 deletions

View File

@ -1,9 +1,31 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
# MIT License
#
# Copyright (c) 2024 vinchent <vinchent@vinchent.xyz>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
name: Build and test
run-name: ${{ gitea.actor }} is building and testing the project!
on: [push]
jobs:
Explore-Gitea-Actions:
Build:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
@ -16,4 +38,18 @@ jobs:
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.23.1'
- run: go version
- name: Setup sqlc
uses: sqlc-dev/setup-sqlc@v4
with:
sqlc-version: '1.25.0'
- run: sqlc version
- name: Build backend
run: make build
- name: Test backend
run: make test
- run: echo "🍏 This job's status is ${{ job.status }}."