howmuch/.gitea/workflows/demo.yaml
Muyao CHEN e1ca08db3a
All checks were successful
Build and test / Build (push) Successful in 1m55s
fix(ci): install npm
2024-10-08 23:43:05 +02:00

64 lines
2.5 KiB
YAML

# 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:
Build:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- 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
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Build frontend
run: make web-build
- name: Test frontend
run: make web-test
- run: echo "🍏 This job's status is ${{ job.status }}."