Skip to content

refactor: new container image build process #3

refactor: new container image build process

refactor: new container image build process #3

Workflow file for this run

on:
- push
- pull_request
- workflow_call
name: Continuous integration
# Declare default permissions as read only.
permissions: read-all
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --workspace
e2e-tests:
name: End to end tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Install venom cli tool
run: |
INSTALL_DIR=$HOME/.venom
mkdir -p $INSTALL_DIR
curl https://github.com/ovh/venom/releases/download/v1.1.0/venom.linux-amd64 -L -o $INSTALL_DIR/venom
chmod +x $INSTALL_DIR/venom
echo $INSTALL_DIR >> $GITHUB_PATH
- name: run e2e tests
run: |
make e2e-tests
# upload e2e logs - simplifies debugging
- name: upload venom.lom
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: venom.log
path: e2e-tests/venom.log
- name: upload policy-server stdout
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: policy-server.stdout.log
path: e2e-tests/policy-server.out
- name: upload policy-server stderr
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: policy-server.stderr.log
path: e2e-tests/policy-server.err
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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
steps:
- uses: actions/checkout@v3
- 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