diff --git a/.github/workflows/hello.yml b/.github/workflows/hello.yml deleted file mode 100644 index d8b55be..0000000 --- a/.github/workflows/hello.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Rust - Hello - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -env: - CARGO_TERM_COLOR: always - -jobs: - build_hello: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Build and test in hello directory - run: | - cd hello - cargo build --verbose - cargo test --verbose diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index bdfa1cb..8e3ebcf 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -7,21 +7,41 @@ on: branches: [ "master" ] jobs: - build: + Setup: runs-on: ubuntu-latest - needs: [hello, variables, test] - strategy: - matrix: - include: - - name: hello - job: build_hello - - name: variables - job: build_variables - - name: test - job: test - - no_dependencies: + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up Rust + uses: actions/setup-rust@v1 + with: + rust-version: stable + build_hello: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Build and test in hello directory + run: | + cd hello + cargo build --verbose + build_variables: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Build and test in variables directory + run: | + cd variables + cargo build --verbose + run_tests: runs-on: ubuntu-latest steps: - - name: No dependencies step - run: echo "This job has no dependencies" \ No newline at end of file + - name: Checkout code + uses: actions/checkout@v3 + - name: Run tests + run: | + cd hello + cargo test + cd ../variables + cargo test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 61aad4d..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Rust - Test - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -env: - CARGO_TERM_COLOR: always - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Test in hello and variables directories - run: | - cd hello - cargo test --verbose - cd ../variables - cargo test --verbose diff --git a/.github/workflows/variables.yml b/.github/workflows/variables.yml deleted file mode 100644 index b1eff80..0000000 --- a/.github/workflows/variables.yml +++ /dev/null @@ -1,31 +0,0 @@ -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -env: - CARGO_TERM_COLOR: always - -jobs: - build_variables: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Build and test in variables directory - run: | - cd variables - cargo build --verbose - cargo test --verbose - - build_without_dependencies: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Build and test without dependencies - run: | - cd hello - cargo build --verbose - cargo test --verbose