diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fc81dd6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,56 @@ +name: CI + +on: + pull_request: + branches: + - main + - develop + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - name: Create .env file + run: | + touch .env.local + echo "${{ secrets.ENV_DEVELOPMENT }}" > .env.local + - uses: actions/checkout@v3 + - uses: actions/setup-node@v2 + with: + node-version: '18' + - run: yarn install + - run: yarn lint + + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Create .env file + run: | + touch .env.local + echo "${{ secrets.ENV_DEVELOPMENT }}" > .env.local + - uses: actions/checkout@v3 + - uses: actions/setup-node@v2 + with: + node-version: '18' + - run: yarn install + - run: CI='false' yarn build + + test: + name: Test + runs-on: ubuntu-latest + + steps: + - name: Create .env file + run: | + touch .env.local + echo "${{ secrets.ENV_DEVELOPMENT }}" > .env.local + - uses: actions/checkout@v3 + - uses: actions/setup-node@v2 + with: + node-version: '18' + - run: yarn install + - run: yarn test