From eb5af12e31d33519fdb216c380d4abc25c111316 Mon Sep 17 00:00:00 2001 From: Oliver Enes Date: Thu, 5 Sep 2024 02:28:31 +0200 Subject: [PATCH] added npm tests --- .github/workflows/automatic_tests.yml | 35 +++++++++++++++++++++++++++ .github/workflows/rust.yml | 22 ----------------- 2 files changed, 35 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/automatic_tests.yml delete mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/automatic_tests.yml b/.github/workflows/automatic_tests.yml new file mode 100644 index 0000000..b9a54c0 --- /dev/null +++ b/.github/workflows/automatic_tests.yml @@ -0,0 +1,35 @@ +name: Automatic tests + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +env: + CARGO_TERM_COLOR: always + +jobs: + build-backend: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + build-frontend: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install NodeJs + uses: actions/setup-node@v4 + with: + node-version: 20.9.0 + - name: Install npm packages + run: npm i + working-directory: frontend + - name: Build frontend + run: npm run prod + working-directory: frontend \ No newline at end of file diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 9fd45e0..0000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Rust - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose