diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 38dd893..0387eb8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,9 +2,10 @@ name: Deploy static content to Pages on: - # Runs on pushes targeting the default branch - push: - branches: ["main"] + workflow_run: + workflows: ["Run Tests", "Run Playwright Tests"] + types: + - completed # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -29,11 +30,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 12 cache: "npm" - name: Install dependencies run: npm install diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index ce55e7b..9851cbf 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,9 +1,9 @@ -name: Playwright Tests +name: Run Playwright Tests on: push: - branches: [main, master] + branches: [main] pull_request: - branches: [main, master] + branches: [main] jobs: test: timeout-minutes: 60 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e19181..d4262f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,9 +2,10 @@ name: Semantic Release on: - # Runs on pushes targeting the default branch - push: - branches: ["main"] + workflow_run: + workflows: ["Deploy static content to Pages"] + types: + - completed # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -15,11 +16,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: "npm" - name: Install dependencies run: npm install diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..469ab0e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,21 @@ +name: Run Tests + +on: + push: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "npm" + - name: Install dependencies + run: npm install + - name: Run unit tests + run: npm test