Skip to content

Commit

Permalink
chore: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
taciturnaxolotl committed Sep 26, 2024
1 parent 6d07cbf commit af92e94
Show file tree
Hide file tree
Showing 62 changed files with 26,775 additions and 9,164 deletions.
3 changes: 2 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
github: muety
liberapay: muety
custom: ['https://paypal.me/ferdinandmuetsch', 'https://www.buymeacoffee.com/n1try']
custom:
["https://paypal.me/ferdinandmuetsch", "https://www.buymeacoffee.com/n1try"]
18 changes: 9 additions & 9 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
name: Bug
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is. Please briefly describe how to reproduce the bug as well as _expected_ vs. _actual_ behavior. Optionally include screenshots and server logs, if helpful.

**System information**
Please provide information on:
* Wakapi version
* Operating system
* If Linux: which distro?
* If Docker: which image and tag?
* Database (SQLite, MySQL, ... ?)

- Wakapi version
- Operating system
- If Linux: which distro?
- If Docker: which image and tag?
- Database (SQLite, MySQL, ... ?)
9 changes: 3 additions & 6 deletions .github/ISSUE_TEMPLATE/other.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
---
name: Other (feature request, question, ...)
about: Anything else
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---


52 changes: 26 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,33 @@ on:

jobs:
test:
name: 'Unit- & API tests'
name: "Unit- & API tests"
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.23
id: go
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.23
id: go

- name: Get dependencies
run: go get
- name: Get dependencies
run: go get

- name: Unit Tests
run: CGO_ENABLED=0 go test `go list ./... | grep -v 'github.com/muety/wakapi/scripts'` -run ./... # skip scripts package, because not actually a package
- name: Unit Tests
run: CGO_ENABLED=0 go test `go list ./... | grep -v 'github.com/muety/wakapi/scripts'` -run ./... # skip scripts package, because not actually a package

- name: API Tests
run: |
npm -g install newman
./testing/run_api_tests.sh
- name: API Tests
run: |
npm -g install newman
./testing/run_api_tests.sh
- name: Mail Tests
run: ./testing/run_mail_tests.sh
- name: Mail Tests
run: ./testing/run_mail_tests.sh

migration:
name: Migration tests
Expand All @@ -45,13 +45,13 @@ jobs:
db: [sqlite, postgres, mysql, mariadb, mssql]

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.23
id: go
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.23
id: go

- run: ./testing/run_api_tests.sh ${{ matrix.db }} --migration
- run: ./testing/run_api_tests.sh ${{ matrix.db }} --migration
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
docker-publish:
name: 'Build and publish Docker image'
name: "Build and publish Docker image"
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
91 changes: 45 additions & 46 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
release:
name: 'Build, package and release to GitHub'
name: "Build, package and release to GitHub"
strategy:
fail-fast: false
matrix:
Expand All @@ -30,56 +30,55 @@ jobs:
runs-on: ${{ matrix.platform }}

steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.23
cache: false
id: go

- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.23
cache: false
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set version
shell: bash
run: |
(git describe --tags --exact-match \
|| git symbolic-ref -q --short HEAD \
|| git rev-parse --short HEAD) > version.txt 2> /dev/null
- name: Set version
shell: bash
run: |
(git describe --tags --exact-match \
|| git symbolic-ref -q --short HEAD \
|| git rev-parse --short HEAD) > version.txt 2> /dev/null
- name: Prepare
run: |
mkdir -p dist/ && cd dist/
cp ../config.default.yml config.yml
- name: Prepare
run: |
mkdir -p dist/ && cd dist/
cp ../config.default.yml config.yml
- name: Build
working-directory: ./dist
shell: bash
run: |
GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} CGO_ENABLED=0 \
go build -v -ldflags '-w -s' ../
- name: Build
working-directory: ./dist
shell: bash
run: |
GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} CGO_ENABLED=0 \
go build -v -ldflags '-w -s' ../
- name: Compress working folder (Windows PowerShell)
working-directory: ./dist
if: "${{ matrix.GOOS == 'windows' }}"
run: |
Compress-Archive -Path .\wakapi.exe, .\config.yml -DestinationPath wakapi_${{ matrix.GOOS }}_${{ matrix.GOARCH }}.zip
- name: Compress working folder (Windows PowerShell)
working-directory: ./dist
if: "${{ matrix.GOOS == 'windows' }}"
run: |
Compress-Archive -Path .\wakapi.exe, .\config.yml -DestinationPath wakapi_${{ matrix.GOOS }}_${{ matrix.GOARCH }}.zip
- name: Compress working folder
working-directory: ./dist
if: "${{ matrix.GOOS != 'windows' }}"
run: |
zip -9 wakapi_${{ matrix.GOOS }}_${{ matrix.GOARCH }}.zip *
- name: Compress working folder
working-directory: ./dist
if: "${{ matrix.GOOS != 'windows' }}"
run: |
zip -9 wakapi_${{ matrix.GOOS }}_${{ matrix.GOARCH }}.zip *
- name: Upload built executable to Release
uses: softprops/action-gh-release@v1
with:
files: ./dist/*.zip

- name: Upload built executable to Release
uses: softprops/action-gh-release@v1
with:
files: ./dist/*.zip

- name: Delete old releases
uses: dev-drprasad/[email protected]
with:
keep_latest: 10
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete old releases
uses: dev-drprasad/[email protected]
with:
keep_latest: 10
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit af92e94

Please sign in to comment.