Merge pull request #283 from ozgurg/dev #325
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: "CI" | |
on: | |
push: | |
branches: [main] | |
paths-ignore: | |
- "**.md" | |
- ".github/dependabot.yml" | |
jobs: | |
ci: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [16] | |
steps: | |
- name: "[SET UP] Checkout π" | |
uses: actions/checkout@master | |
- name: "[SET UP] Setup node env π" | |
uses: actions/setup-node@v2.5.2 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: "[SET UP] Cache node_modules π¦" | |
uses: actions/cache@v2.1.8 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: "[SET UP] Install dependencies π¨π»βπ»" | |
run: npm ci | |
- name: "[QUALITY] Run linter π" | |
run: npm run lint | |
- name: "[QUALITY] Run unit tests π§ͺ" | |
run: npm run test | |
- name: "[DEPLOY] Build for production" | |
run: npm run generate | |
- name: "[DEPLOY] Deploy to Firebase" | |
uses: w9jds/firebase-action@v11.24.1 | |
with: | |
args: deploy --only hosting | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} |