Merge pull request #39 from thehaung-zz/notice-redhat-err #79
Workflow file for this run
This file contains hidden or 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: CI | |
| on: [ push, pull_request ] | |
| jobs: | |
| cicd-linux: | |
| name: CI Linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v2 | |
| - name: Install stable toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Get temporary secret key | |
| shell: sh | |
| run: | | |
| mv src/secret.key.sample src/secret.key | |
| - name: Import sample dotenv file | |
| shell: sh | |
| run: | | |
| mv dotenv.sample .env | |
| - name: Cache cargo registry | |
| uses: actions/cache@v1 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-registry- | |
| ${{ runner.os }}- | |
| - name: Cache cargo index | |
| uses: actions/cache@v1 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-index-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-index- | |
| ${{ runner.os }}- | |
| - name: Cache cargo build | |
| uses: actions/cache@v1 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| - name: Run cargo check | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: check | |
| args: --release | |
| - name: Run cargo fmt | |
| uses: actions-rs/cargo@v1 | |
| continue-on-error: true | |
| with: | |
| command: fmt | |
| args: --all -- --check | |
| - name: Run cargo clippy | |
| uses: actions-rs/cargo@v1 | |
| continue-on-error: true | |
| with: | |
| command: clippy | |
| args: -- -D warnings | |
| - name: Run cargo test | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: test | |
| args: -- --nocapture | |
| - name: Run cargo build | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: build | |
| args: --release | |
| cicd-windows: | |
| name: CI Windows | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v2 | |
| - name: Install stable toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Get temporary secret key | |
| shell: cmd | |
| run: ren src\secret.key.sample secret.key | |
| - name: Import sample dotenv file | |
| shell: cmd | |
| run: ren dotenv.sample .env | |
| - name: Cache cargo registry | |
| uses: actions/cache@v1 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-registry- | |
| ${{ runner.os }}- | |
| - name: Cache cargo index | |
| uses: actions/cache@v1 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-index-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-index- | |
| ${{ runner.os }}- | |
| - name: Cache cargo build | |
| uses: actions/cache@v1 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| - name: Run cargo check | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: check | |
| args: --release | |
| env: | |
| RUSTFLAGS: -L D:\a\actix-web-rest-api-with-jwt\actix-web-rest-api-with-jwt\libs\windows | |
| - name: Run cargo fmt | |
| uses: actions-rs/cargo@v1 | |
| continue-on-error: true | |
| with: | |
| command: fmt | |
| args: --all -- --check | |
| - name: Run cargo clippy | |
| uses: actions-rs/cargo@v1 | |
| continue-on-error: true | |
| with: | |
| command: clippy | |
| args: -- -D warnings | |
| - name: Run cargo test | |
| uses: actions-rs/cargo@v1 | |
| continue-on-error: true | |
| with: | |
| command: test | |
| args: -- --nocapture | |
| env: | |
| RUSTFLAGS: -L D:\a\actix-web-rest-api-with-jwt\actix-web-rest-api-with-jwt\libs\windows | |
| - name: Run cargo build | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: build | |
| args: --release | |
| env: | |
| RUSTFLAGS: -L D:\a\actix-web-rest-api-with-jwt\actix-web-rest-api-with-jwt\libs\windows | |
| cicd-macos: | |
| name: CI macOS | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v2 | |
| - name: Install stable toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Get temporary secret key | |
| shell: sh | |
| run: | | |
| mv src/secret.key.sample src/secret.key | |
| - name: Import sample dotenv file | |
| shell: sh | |
| run: | | |
| mv dotenv.sample .env | |
| - name: Cache cargo registry | |
| uses: actions/cache@v1 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-registry- | |
| ${{ runner.os }}- | |
| - name: Cache cargo index | |
| uses: actions/cache@v1 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-index-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-index- | |
| ${{ runner.os }}- | |
| - name: Cache cargo build | |
| uses: actions/cache@v1 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| - name: Run cargo check | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: check | |
| args: --release | |
| - name: Run cargo fmt | |
| uses: actions-rs/cargo@v1 | |
| continue-on-error: true | |
| with: | |
| command: fmt | |
| args: --all -- --check | |
| - name: Run cargo clippy | |
| uses: actions-rs/cargo@v1 | |
| continue-on-error: true | |
| with: | |
| command: clippy | |
| args: -- -D warnings | |
| - name: Run cargo test | |
| uses: actions-rs/cargo@v1 | |
| continue-on-error: true | |
| with: | |
| command: test | |
| args: -- --nocapture | |
| - name: Run cargo build | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: build | |
| args: --release |