Scaffold List All Permissions Command #120
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: [main] | |
jobs: | |
test: | |
name: Integration Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
services: | |
mysql: | |
image: mysql:8 | |
env: | |
MYSQL_DATABASE: test | |
MYSQL_ROOT_PASSWORD: pass | |
ports: | |
- 3306:3306 | |
options: >- | |
--health-cmd "mysqladmin ping" | |
--health-interval 10s | |
--health-start-period 10s | |
--health-timeout 5s | |
--health-retries 10 | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.1 | |
- name: Setup Go | |
uses: actions/setup-go@v5.0.0 | |
with: | |
go-version: 1.21.x | |
- name: Setup SQLX | |
run: cargo install sqlx-cli | |
- name: Get migrations | |
run: | | |
git clone https://github.com/petrichormud/db.git | |
- name: Migrate test Database | |
run: | | |
sqlx migrate run -D "mysql://root:pass@127.0.0.1/test" --source ./db/migrations | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20.x" | |
- name: NPM Install | |
run: npm install | |
- name: Run Tests | |
env: | |
DATABASE_URL: root:pass@/test?parseTime=true | |
run: make test-ci |