Skip to content

fixes some paths

fixes some paths #50

Workflow file for this run

on: [push, pull_request]
name: Continuous integration
jobs:
check:
name: Check
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
env:
DATABASE_URL: "mysql://root:root@localhost:3306/test"
steps:
- name: Setup DB
run: |
sudo apt-get install -y mysql-client
mysql --host 127.0.0.1 --port 3306 -uroot -proot -e "
CREATE TABLE
test.users (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name CHAR(100) NOT NULL,
email VARCHAR(255) NOT NULL UNIQUE,
verified BOOLEAN NOT NULL DEFAULT FALSE,
password VARCHAR(100) NOT NULL,
role VARCHAR(50) NOT NULL DEFAULT 'user',
verification_code VARCHAR(255),
password_reset_token VARCHAR(50),
password_reset_at TIMESTAMP
);
CREATE INDEX users_email_idx ON test.users (email);
CREATE INDEX idx_verification_code ON test.users(verification_code);
CREATE INDEX idx_password_reset_token ON test.users(password_reset_token);
"
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
test:
name: Test Suite
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
env:
DATABASE_URL: "mysql://root:root@localhost:3306/test"
steps:
- name: Setup DB
run: |
sudo apt-get install -y mysql-client
mysql --host 127.0.0.1 --port 3306 -uroot -proot -e "
CREATE TABLE
test.users (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name CHAR(100) NOT NULL,
email VARCHAR(255) NOT NULL UNIQUE,
verified BOOLEAN NOT NULL DEFAULT FALSE,
password VARCHAR(100) NOT NULL,
role VARCHAR(50) NOT NULL DEFAULT 'user',
verification_code VARCHAR(255),
password_reset_token VARCHAR(50),
password_reset_at TIMESTAMP
);
CREATE INDEX users_email_idx ON test.users (email);
CREATE INDEX idx_verification_code ON test.users(verification_code);
CREATE INDEX idx_password_reset_token ON test.users(password_reset_token);
"
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
fmt:
name: Rustfmt
runs-on: ubuntu-latest
env:
DATABASE_URL: "mysql://root:root@localhost:3306/test"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
env:
DATABASE_URL: "mysql://root:root@localhost:3306/test"
steps:
- name: Setup DB
run: |
sudo apt-get install -y mysql-client
mysql --host 127.0.0.1 --port 3306 -uroot -proot -e "
CREATE TABLE
test.users (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name CHAR(100) NOT NULL,
email VARCHAR(255) NOT NULL UNIQUE,
verified BOOLEAN NOT NULL DEFAULT FALSE,
password VARCHAR(100) NOT NULL,
role VARCHAR(50) NOT NULL DEFAULT 'user',
verification_code VARCHAR(255),
password_reset_token VARCHAR(50),
password_reset_at TIMESTAMP
);
CREATE INDEX users_email_idx ON test.users (email);
CREATE INDEX idx_verification_code ON test.users(verification_code);
CREATE INDEX idx_password_reset_token ON test.users(password_reset_token);
"
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings