Chore: Upgrade all dependencies and fix breaking changes (#111) #67
This file contains 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: "Test 'Push' Workflow" | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
# same job as build.yml copied here to keep build & E2E workflows separate | |
# Can be optimized once Github supports Actions partials | |
build: | |
name: Test build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install dependencies | |
run: yarn install | |
- name: Build | |
run: yarn build | |
- name: Ensure build was committed (necessary for Github Actions) | |
run: "[[ -z $(git status -s dist ':^dist/src') ]]" | |
- name: "[Test] Unit tests" | |
run: yarn test | |
e2e-test: | |
name: "'Push' E2E tests" | |
if: github.repository == 'Olivr/copybara-action' | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: "[Test] Basic usage" | |
uses: ./ | |
with: | |
sot_repo: Olivr/copybara-action | |
destination_repo: olivr-test/copybara-action-test | |
access_token: ${{ secrets.GH_TOKEN_BOT }} | |
ssh_key: ${{ secrets.GH_SSH_BOT }} | |
- name: "[Test] Missing repos" | |
id: missing-repos | |
continue-on-error: true | |
uses: ./ | |
with: | |
destination_repo: olivr-test/copybara-action-test | |
ssh_key: ${{ secrets.GH_SSH_BOT }} | |
workflow: push | |
- name: ".........⏳" | |
if: steps.missing-repos.outcome != 'failure' || !startsWith(steps.missing-repos.outputs.msg, '[action]') | |
run: exit 1 | |
- name: "[Test] Missing token" | |
id: missing-token | |
continue-on-error: true | |
uses: ./ | |
with: | |
sot_repo: Olivr/copybara-action | |
destination_repo: olivr-test/copybara-action-test | |
ssh_key: ${{ secrets.GH_SSH_BOT }} | |
- name: "..........⏳" | |
if: steps.missing-token.outcome != 'failure' || !startsWith(steps.missing-token.outputs.msg, '[action]') | |
run: exit 1 |